mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Fix bug with UID parsing
This commit is contained in:
parent
07d90fa476
commit
c8c7305cbf
1 changed files with 4 additions and 1 deletions
|
|
@ -51,8 +51,11 @@ class Item(object):
|
||||||
def uid(self):
|
def uid(self):
|
||||||
'''Global identifier of the item, across storages, doesn't change after
|
'''Global identifier of the item, across storages, doesn't change after
|
||||||
a modification of the item.'''
|
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:
|
try:
|
||||||
return self.parsed['UID'].strip() or None
|
return x['UID'].strip() or None
|
||||||
except KeyError:
|
except KeyError:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue