log exception for broken items
This commit is contained in:
parent
e6ba31937a
commit
18181374e1
@ -638,7 +638,7 @@ class Collection(BaseCollection):
|
|||||||
try:
|
try:
|
||||||
item = Item(self, vobject.readOne(text), href, last_modified)
|
item = Item(self, vobject.readOne(text), href, last_modified)
|
||||||
except:
|
except:
|
||||||
self.logger.error("Object broken (skip 'get'): %s", path)
|
self.logger.exception("Object broken (skip 'get'): %s", path)
|
||||||
return None;
|
return None;
|
||||||
return item;
|
return item;
|
||||||
|
|
||||||
@ -717,7 +717,7 @@ class Collection(BaseCollection):
|
|||||||
try:
|
try:
|
||||||
items.append(vobject.readOne(fd.read()))
|
items.append(vobject.readOne(fd.read()))
|
||||||
except:
|
except:
|
||||||
self.logger.error("Object broken (skip 'list'): %s", path)
|
self.logger.exception("Object broken (skip 'list'): %s", path)
|
||||||
time_end = datetime.datetime.now()
|
time_end = datetime.datetime.now()
|
||||||
self.logger.info("Collection read %d items in %s sec from %s", len(items),(time_end - time_begin).total_seconds(), self._filesystem_path)
|
self.logger.info("Collection read %d items in %s sec from %s", len(items),(time_end - time_begin).total_seconds(), self._filesystem_path)
|
||||||
if self.get_meta("tag") == "VCALENDAR":
|
if self.get_meta("tag") == "VCALENDAR":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user