[CalendarServer-changes] [10065] CalendarServer/branches/users/glyph/one-home-list-api
source_changes at macosforge.org
source_changes at macosforge.org
Fri Nov 16 14:49:05 PST 2012
Revision: 10065
http://trac.calendarserver.org//changeset/10065
Author: glyph at apple.com
Date: 2012-11-16 14:49:05 -0800 (Fri, 16 Nov 2012)
Log Message:
-----------
fix the implementation to make the test not have an extra outstanding transaction
Modified Paths:
--------------
CalendarServer/branches/users/glyph/one-home-list-api/txdav/common/datastore/sql.py
Property Changed:
----------------
CalendarServer/branches/users/glyph/one-home-list-api/
Modified: CalendarServer/branches/users/glyph/one-home-list-api/txdav/common/datastore/sql.py
===================================================================
--- CalendarServer/branches/users/glyph/one-home-list-api/txdav/common/datastore/sql.py 2012-11-16 22:49:04 UTC (rev 10064)
+++ CalendarServer/branches/users/glyph/one-home-list-api/txdav/common/datastore/sql.py 2012-11-16 22:49:05 UTC (rev 10065)
@@ -25,6 +25,8 @@
"CommonHome",
]
+import sys
+
from uuid import uuid4, UUID
from zope.interface import implements, directlyProvides
@@ -200,9 +202,15 @@
txn = yield self.newTransaction()
allUIDs = yield Select([schema.CALENDAR_HOME.OWNER_UID],
From=schema.CALENDAR_HOME).on(txn)
- for [uid] in allUIDs:
- yield action(txn, (yield txn.calendarHomeWithUID(uid)))
- yield txn.commit()
+ try:
+ for [uid] in allUIDs:
+ yield action(txn, (yield txn.calendarHomeWithUID(uid)))
+ except:
+ a, b, c = sys.exc_info()
+ yield txn.abort()
+ raise a, b, c
+ else:
+ yield txn.commit()
def newTransaction(self, label="unlabeled", disableCache=False):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20121116/b6c2f05c/attachment.html>
More information about the calendarserver-changes
mailing list