[CalendarServer-changes] [3243] CalendarServer/trunk/twistedcaldav/method/delete.py
source_changes at macosforge.org
source_changes at macosforge.org
Tue Oct 28 09:54:59 PDT 2008
Revision: 3243
http://trac.macosforge.org/projects/calendarserver/changeset/3243
Author: wsanchez at apple.com
Date: 2008-10-28 09:54:56 -0700 (Tue, 28 Oct 2008)
Log Message:
-----------
Cosmetic
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/method/delete.py
Modified: CalendarServer/trunk/twistedcaldav/method/delete.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/method/delete.py 2008-10-28 02:13:04 UTC (rev 3242)
+++ CalendarServer/trunk/twistedcaldav/method/delete.py 2008-10-28 16:54:56 UTC (rev 3243)
@@ -43,26 +43,27 @@
parent = (yield request.locateResource(parentURL))
calendar = None
- is_calendar_collection = False
- is_calendar_resource = False
- _lock = None
+ isCalendarCollection = False
+ isCalendarResource = False
+ lock = None
+
if self.exists():
if isCalendarCollectionResource(parent):
- is_calendar_resource = True
+ isCalendarResource = True
calendar = self.iCalendar()
- _lock = MemcacheLock("ImplicitUIDLock", calendar.resourceUID(), timeout=60.0)
+ lock = MemcacheLock("ImplicitUIDLock", calendar.resourceUID(), timeout=60.0)
elif isCalendarCollectionResource(self):
- is_calendar_collection = True
+ isCalendarCollection = True
try:
- if _lock:
- yield _lock.acquire()
+ if lock:
+ yield lock.acquire()
response = (yield super(CalDAVFile, self).http_DELETE(request))
if response == responsecode.NO_CONTENT:
- if is_calendar_resource:
+ if isCalendarResource:
index = parent.index()
index.deleteResource(self.fp.basename())
@@ -74,20 +75,20 @@
scheduler = ImplicitScheduler()
yield scheduler.doImplicitScheduling(request, self, calendar, True)
- elif is_calendar_collection:
+ elif isCalendarCollection:
# Do some clean up
yield self.deletedCalendar(request)
- if _lock:
- yield _lock.release()
+ if lock:
+ yield lock.release()
except MemcacheLockTimeoutError:
raise HTTPError(StatusResponse(responsecode.CONFLICT, "Resource: %s currently in use on the server." % (self.uri,)))
except Exception, e:
- if _lock:
- yield _lock.clean()
+ if lock:
+ yield lock.clean()
raise e
returnValue(response)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20081028/3ed449f2/attachment.html>
More information about the calendarserver-changes
mailing list