From c8c7305cbf0a0afd66586155e7f3e299df942326 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Sat, 7 Mar 2015 21:09:17 +0100 Subject: [PATCH] Fix bug with UID parsing --- vdirsyncer/utils/vobject.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vdirsyncer/utils/vobject.py b/vdirsyncer/utils/vobject.py index f6ba9ad..e60b52e 100644 --- a/vdirsyncer/utils/vobject.py +++ b/vdirsyncer/utils/vobject.py @@ -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