diff --git a/radicale/app/put.py b/radicale/app/put.py index de11589b..0a72d00a 100644 --- a/radicale/app/put.py +++ b/radicale/app/put.py @@ -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