1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-07-23 17:48:30 +00:00

Don't crash when getting unknown collections

Fix #422.
This commit is contained in:
Guillaume Ayoub 2016-07-14 01:39:57 +02:00
parent 4c91ee8906
commit 5bd80d8d13
2 changed files with 6 additions and 1 deletions

View file

@ -543,6 +543,8 @@ class Collection(BaseCollection):
return time.strftime("%a, %d %b %Y %H:%M:%S GMT", time.gmtime(last))
def serialize(self):
if not os.path.exists(self._filesystem_path):
return None
items = []
for href in os.listdir(self._filesystem_path):
path = os.path.join(self._filesystem_path, href)