Workaround for bugs in VObject during filtering
This commit is contained in:
@ -1034,8 +1034,19 @@ class Collection(BaseCollection):
|
||||
ctext = vobject_item.serialize()
|
||||
cetag = get_etag(ctext)
|
||||
try:
|
||||
ctag, cstart, cend = xmlutils.find_tag_and_time_range(
|
||||
vobject_item)
|
||||
try:
|
||||
ctag, cstart, cend = xmlutils.find_tag_and_time_range(
|
||||
vobject_item)
|
||||
except xmlutils.VObjectBugException as e:
|
||||
# HACK: Extraction of metadata failed, because of bugs in
|
||||
# VObject.
|
||||
self.logger.warning(
|
||||
"Failed to find tag and time range of item %r from %r "
|
||||
"(Bug in VObject): %s", href, self.path, e,
|
||||
exc_info=True)
|
||||
ctag = xmlutils.find_tag(vobject_item)
|
||||
cstart = xmlutils.TIMESTAMP_MIN
|
||||
cend = xmlutils.TIMESTAMP_MAX
|
||||
except Exception as e:
|
||||
raise RuntimeError("Failed to find tag and time range of item "
|
||||
"%r from %r: %s" % (href, self.path,
|
||||
|
Reference in New Issue
Block a user