excuses.yaml: Distinguish between source and item names

Signed-off-by: Niels Thykier <niels@thykier.net>
debian
Niels Thykier 9 years ago
parent 1400fa1384
commit 7b8b9e8258

@ -197,9 +197,15 @@ class Excuse(object):
def excusedata(self): def excusedata(self):
"""Render the excuse in as key-value data""" """Render the excuse in as key-value data"""
source = self.name
if '/' in source:
source = source.split("/")[0]
if source[0] == '-':
source = source[1:]
excusedata = {} excusedata = {}
excusedata["excuses"] = self._text() excusedata["excuses"] = self._text()
excusedata["source"] = self.name excusedata["item-name"] = self.name
excusedata["source"] = source
excusedata["old-version"] = self.ver[0] excusedata["old-version"] = self.ver[0]
excusedata["new-version"] = self.ver[1] excusedata["new-version"] = self.ver[1]
if self.maint: if self.maint:

Loading…
Cancel
Save