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

Clean and reorder calendar functions

This commit is contained in:
Guillaume Ayoub 2012-01-12 02:39:47 +01:00
parent b1414c152d
commit 022b2aa91f
4 changed files with 91 additions and 90 deletions

View file

@ -120,7 +120,7 @@ def _response(code):
def name_from_path(path, calendar):
"""Return Radicale item name from ``path``."""
calendar_parts = calendar.local_path.strip("/").split("/")
calendar_parts = calendar.path.split("/")
path_parts = path.strip("/").split("/")
return path_parts[-1] if (len(path_parts) - len(calendar_parts)) else None
@ -153,7 +153,7 @@ def delete(path, calendar):
"""
# Reading request
if calendar.local_path == path.strip("/"):
if calendar.path == path.strip("/"):
# Delete the whole calendar
calendar.delete()
else: