1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-08-10 18:40:53 +00:00

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
commit b9db971060
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):