Merge branch 'trycatch-broken-objects' of https://github.com/pbiering/Radicale into pbiering-trycatch-broken-objects
This commit is contained in:
commit
5d67257555
@ -244,6 +244,8 @@ class Application:
|
|||||||
read_allowed_items = []
|
read_allowed_items = []
|
||||||
write_allowed_items = []
|
write_allowed_items = []
|
||||||
for item in items:
|
for item in items:
|
||||||
|
if not item:
|
||||||
|
continue
|
||||||
if isinstance(item, self.Collection):
|
if isinstance(item, self.Collection):
|
||||||
path = item.path
|
path = item.path
|
||||||
else:
|
else:
|
||||||
|
@ -34,6 +34,7 @@ import stat
|
|||||||
import subprocess
|
import subprocess
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
|
import datetime
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from hashlib import md5
|
from hashlib import md5
|
||||||
from importlib import import_module
|
from importlib import import_module
|
||||||
@ -699,8 +700,13 @@ class Collection(BaseCollection):
|
|||||||
|
|
||||||
def serialize(self):
|
def serialize(self):
|
||||||
items = []
|
items = []
|
||||||
|
time_begin = datetime.datetime.now()
|
||||||
for href in self.list():
|
for href in self.list():
|
||||||
items.append(self.get(href).item)
|
items.append(self.get(href).item)
|
||||||
|
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)
|
||||||
if self.get_meta("tag") == "VCALENDAR":
|
if self.get_meta("tag") == "VCALENDAR":
|
||||||
collection = vobject.iCalendar()
|
collection = vobject.iCalendar()
|
||||||
for item in items:
|
for item in items:
|
||||||
|
@ -872,6 +872,8 @@ def report(base_prefix, path, xml_request, collection):
|
|||||||
items = collection.pre_filtered_list(filters)
|
items = collection.pre_filtered_list(filters)
|
||||||
|
|
||||||
for item in items:
|
for item in items:
|
||||||
|
if not item:
|
||||||
|
continue
|
||||||
if filters:
|
if filters:
|
||||||
match = (
|
match = (
|
||||||
_comp_match if collection.get_meta("tag") == "VCALENDAR"
|
_comp_match if collection.get_meta("tag") == "VCALENDAR"
|
||||||
|
Loading…
Reference in New Issue
Block a user