Fix bug with UID parsing

This commit is contained in:
Markus Unterwaditzer 2015-03-07 21:09:17 +01:00
parent 07d90fa476
commit c8c7305cbf

View file

@ -51,8 +51,11 @@ class Item(object):
def uid(self):
'''Global identifier of the item, across storages, doesn't change after
a modification of the item.'''
# Don't actually parse component, but treat all lines as single
# component, avoiding traversal through all subcomponents.
x = _Component('TEMP', self.raw.splitlines(), [])
try:
return self.parsed['UID'].strip() or None
return x['UID'].strip() or None
except KeyError:
return None