Merge branch 'fixed-propfind-handling' of https://github.com/muggenhor/Radicale into muggenhor-fixed-propfind-handling

This commit is contained in:
Guillaume Ayoub
2017-02-26 15:33:34 +01:00
2 changed files with 75 additions and 13 deletions

View File

@@ -675,10 +675,11 @@ class Collection(BaseCollection):
os.remove(path)
self._sync_directory(os.path.dirname(path))
def get_meta(self, key):
def get_meta(self, key=None):
if os.path.exists(self._props_path):
with open(self._props_path, encoding=self.encoding) as prop:
return json.load(prop).get(key)
meta = json.load(prop)
return meta.get(key) if key else meta
def set_meta(self, props):
if os.path.exists(self._props_path):