[CalendarServer-changes] [7192] CalendarServer/trunk/twistedcaldav/method

source_changes at macosforge.org source_changes at macosforge.org
Mon Mar 14 10:35:29 PDT 2011


Revision: 7192
          http://trac.macosforge.org/projects/calendarserver/changeset/7192
Author:   cdaboo at apple.com
Date:     2011-03-14 10:35:29 -0700 (Mon, 14 Mar 2011)
Log Message:
-----------
Eliminate a traceback into the error log.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/method/put_addressbook_common.py
    CalendarServer/trunk/twistedcaldav/method/put_common.py

Modified: CalendarServer/trunk/twistedcaldav/method/put_addressbook_common.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/method/put_addressbook_common.py	2011-03-14 15:18:24 UTC (rev 7191)
+++ CalendarServer/trunk/twistedcaldav/method/put_addressbook_common.py	2011-03-14 17:35:29 UTC (rev 7192)
@@ -23,7 +23,6 @@
 import types
 
 from twisted.internet import reactor
-from twisted.python.failure import Failure
 
 from txdav.common.icommondatastore import ReservationError
 
@@ -452,20 +451,8 @@
             returnValue(response)
     
         except Exception, err:
-            # Preserve the real traceback to display later, since the error-
-            # handling here yields out of the generator and thereby shreds the
-            # stack.
-            f = Failure()
 
             if reservation:
                 yield reservation.unreserve()
-    
-            # FIXME: transaction needs to be rolled back.
 
-            # Display the traceback.  Unfortunately this will usually be
-            # duplicated by the higher-level exception handler that captures
-            # the thing that raises here, but it's better than losing the
-            # information.
-            f.printTraceback()
-
             raise err

Modified: CalendarServer/trunk/twistedcaldav/method/put_common.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/method/put_common.py	2011-03-14 15:18:24 UTC (rev 7191)
+++ CalendarServer/trunk/twistedcaldav/method/put_common.py	2011-03-14 17:35:29 UTC (rev 7192)
@@ -28,7 +28,6 @@
 from twisted.internet import reactor
 from twisted.internet.defer import Deferred, inlineCallbacks, succeed
 from twisted.internet.defer import returnValue
-from twisted.python.failure import Failure
 from twisted.python import hashlib
 
 from twext.web2.dav.util import joinURL, parentForURL
@@ -1039,15 +1038,10 @@
             returnValue(response)
     
         except Exception, err:
-            # Preserve the real traceback to display later, since the error-
-            # handling here yields out of the generator and thereby shreds the
-            # stack.
-            f = Failure()
+
             if reservation:
                 yield reservation.unreserve()
     
-            # FIXME: transaction needs to be rolled back.
-
             if isinstance(err, InvalidOverriddenInstanceError):
                 raise HTTPError(ErrorResponse(
                     responsecode.FORBIDDEN,
@@ -1061,9 +1055,4 @@
                     "Too many recurrence instances",
                 ))
             else:
-                # Display the traceback.  Unfortunately this will usually be
-                # duplicated by the higher-level exception handler that captures
-                # the thing that raises here, but it's better than losing the
-                # information.
-                f.printTraceback()
                 raise err
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110314/81f97e26/attachment-0001.html>


More information about the calendarserver-changes mailing list