Clean owner-less calendars support (fixes #254)

This commit is contained in:
Guillaume Ayoub
2011-04-10 18:51:38 +02:00
parent 6c65cc1539
commit 5673444ba7
3 changed files with 7 additions and 18 deletions

View File

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