[CalendarServer-changes] [1615]
CalendarServer/trunk/twistedcaldav/method/put_common.py
source_changes at macosforge.org
source_changes at macosforge.org
Wed Jun 20 14:25:52 PDT 2007
Revision: 1615
http://trac.macosforge.org/projects/calendarserver/changeset/1615
Author: cdaboo at apple.com
Date: 2007-06-20 14:25:52 -0700 (Wed, 20 Jun 2007)
Log Message:
-----------
Handle bare excepts to ensure rollback occurs.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/method/put_common.py
Modified: CalendarServer/trunk/twistedcaldav/method/put_common.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/method/put_common.py 2007-06-20 21:11:14 UTC (rev 1614)
+++ CalendarServer/trunk/twistedcaldav/method/put_common.py 2007-06-20 21:25:52 UTC (rev 1615)
@@ -580,4 +580,17 @@
rollback.Rollback()
raise
+ # FIXME: remove this bare except once we move to only supporting Python 2.5.
+ # This is only here now because at least one dependent library was raising a string exception
+ # which was not caught and did not result on resource rollback.
+ except:
+ if reserved:
+ destination_index.unreserveUID(uid)
+ reserved = False
+
+ # Roll back changes to original server state. Note this may do nothing
+ # if the rollback has already ocurred or changes already committed.
+ rollback.Rollback()
+ raise
+
storeCalendarObjectResource = deferredGenerator(storeCalendarObjectResource)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20070620/c4d10ec1/attachment.html
More information about the calendarserver-changes
mailing list