1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-06-26 16:45:52 +00:00

Allow missing owner

This commit is contained in:
René 'Necoro' Neumann 2011-03-25 01:03:53 +01:00
parent 2e1b51e3c1
commit 72c57a042d
4 changed files with 21 additions and 4 deletions

View file

@ -135,8 +135,16 @@ class Calendar(object):
def __init__(self, path):
"""Initialize the calendar with ``cal`` and ``user`` parameters."""
split_path = path.split("/")
self.encoding = "utf-8"
self.owner = path.split("/")[0]
if len(split_path) > 1:
self.owner = split_path[0]
else:
self.owner = None
self.path = os.path.join(FOLDER, path.replace("/", os.path.sep))
@staticmethod