[CalendarServer-changes] [11305] CalendarServer/branches/users/glyph/q-delete-no-concurrency/twext/ enterprise/dal/record.py

source_changes at macosforge.org source_changes at macosforge.org
Wed Jun 5 11:42:12 PDT 2013


Revision: 11305
          http://trac.calendarserver.org//changeset/11305
Author:   glyph at apple.com
Date:     2013-06-05 11:42:12 -0700 (Wed, 05 Jun 2013)
Log Message:
-----------
Fix the test.

Modified Paths:
--------------
    CalendarServer/branches/users/glyph/q-delete-no-concurrency/twext/enterprise/dal/record.py

Modified: CalendarServer/branches/users/glyph/q-delete-no-concurrency/twext/enterprise/dal/record.py
===================================================================
--- CalendarServer/branches/users/glyph/q-delete-no-concurrency/twext/enterprise/dal/record.py	2013-06-05 18:42:11 UTC (rev 11304)
+++ CalendarServer/branches/users/glyph/q-delete-no-concurrency/twext/enterprise/dal/record.py	2013-06-05 18:42:12 UTC (rev 11305)
@@ -258,12 +258,13 @@
         """
         Delete this row from the database.
 
-        @return: a L{Deferred} which fires when the underlying row has been
-            deleted.
+        @return: a L{Deferred} which fires with C{None} when the underlying row
+            has been deleted, or fails with L{NoSuchRecord} if the underlying
+            row was already deleted.
         """
         return Delete(From=self.table,
                       Where=self._primaryKeyComparison(self._primaryKeyValue())
-                      ).on(self.transaction)
+                      ).on(self.transaction, raiseOnZeroRowCount=NoSuchRecord)
 
 
     @inlineCallbacks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130605/4e61f34f/attachment.html>


More information about the calendarserver-changes mailing list