Log name of faulty component
If vobject can't parse a component it raises an exception, but the filename of that component is missing in the logs.
This commit is contained in:
parent
5ccfe16372
commit
6df54bf88a
@ -631,7 +631,12 @@ class Collection(BaseCollection):
|
||||
last_modified = time.strftime(
|
||||
"%a, %d %b %Y %H:%M:%S GMT",
|
||||
time.gmtime(os.path.getmtime(path)))
|
||||
return Item(self, vobject.readOne(text), href, last_modified)
|
||||
try:
|
||||
item = vobject.readOne(text)
|
||||
except Exception:
|
||||
self.logger.error("Failed to parse component: %s", href)
|
||||
raise
|
||||
return Item(self, item, href, last_modified)
|
||||
|
||||
def upload(self, href, vobject_item):
|
||||
if not is_safe_filesystem_path_component(href):
|
||||
|
Loading…
Reference in New Issue
Block a user