|
@@ -93,9 +93,13 @@ def prepare(vobject_items: List[vobject.base.Component], path: str,
|
|
|
logger.debug("Prepare item with UID '%s'", item.uid)
|
|
logger.debug("Prepare item with UID '%s'", item.uid)
|
|
|
try:
|
|
try:
|
|
|
item.prepare()
|
|
item.prepare()
|
|
|
- except ValueError as e:
|
|
|
|
|
|
|
+ except (RuntimeError, ValueError, AttributeError) as e:
|
|
|
if logger.isEnabledFor(logging.DEBUG):
|
|
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:
|
|
else:
|
|
|
logger.warning("Problem during prepare item with UID '%s' (content suppressed in this loglevel): %s", item.uid, e)
|
|
logger.warning("Problem during prepare item with UID '%s' (content suppressed in this loglevel): %s", item.uid, e)
|
|
|
raise
|
|
raise
|