extend broken vcalendar item log
This commit is contained in:
@@ -93,9 +93,13 @@ def prepare(vobject_items: List[vobject.base.Component], path: str,
|
||||
logger.debug("Prepare item with UID '%s'", item.uid)
|
||||
try:
|
||||
item.prepare()
|
||||
except ValueError as e:
|
||||
except (RuntimeError, ValueError, AttributeError) as e:
|
||||
if logger.isEnabledFor(logging.DEBUG):
|
||||
logger.warning("Problem during prepare item with UID '%s' (content below): %s\n%s", item.uid, e, item._text)
|
||||
if item._text is None:
|
||||
content = vobject_item
|
||||
else:
|
||||
content = item._text
|
||||
logger.warning("Problem during prepare item with UID '%s' (content below): %s\n%s", item.uid, e, content)
|
||||
else:
|
||||
logger.warning("Problem during prepare item with UID '%s' (content suppressed in this loglevel): %s", item.uid, e)
|
||||
raise
|
||||
|
||||
Reference in New Issue
Block a user