Clean owner-less calendars support (fixes #254)
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user