[CalendarServer-changes] [2498] CalendarServer/trunk/twistedcaldav/itip.py

source_changes at macosforge.org source_changes at macosforge.org
Sun May 25 12:25:01 PDT 2008


Revision: 2498
          http://trac.macosforge.org/projects/calendarserver/changeset/2498
Author:   wsanchez at apple.com
Date:     2008-05-25 12:24:58 -0700 (Sun, 25 May 2008)

Log Message:
-----------
Not the (unfortunately large number of) bare exceptions here as FIXME.
raise instantiated exceptions.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/itip.py

Modified: CalendarServer/trunk/twistedcaldav/itip.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/itip.py	2008-05-25 18:27:29 UTC (rev 2497)
+++ CalendarServer/trunk/twistedcaldav/itip.py	2008-05-25 19:24:58 UTC (rev 2498)
@@ -34,7 +34,6 @@
 import md5
 import time
 
-from twisted.python import failure
 from twisted.internet.defer import waitForDeferred, deferredGenerator, maybeDeferred
 from twisted.web2.dav import davxml
 from twisted.web2.dav.method.report import NumberOfMatchesWithinLimits
@@ -180,8 +179,9 @@
                     newInboxResource(child, newchild)
                 processed = "processed"
             except:
-                log.err("Error while auto-processing iTIP: %s" % (failure.Failure(),))
-                raise iTipException
+                # FIXME: bare except
+                log.err("Error while auto-processing iTIP: %s" % (Failure(),))
+                raise iTipException()
             
     else:
         # So we have a partial update. That means we have to do partial updates to instances in
@@ -249,8 +249,9 @@
                     
                 processed = "processed"
             except:
-                log.err("Error while auto-processing iTIP: %s" % (failure.Failure(),))
-                raise iTipException
+                # FIXME: bare except
+                log.err("Error while auto-processing iTIP: %s" % (Failure(),))
+                raise iTipException()
 
     # Remove the now processed incoming request.
     try:
@@ -266,8 +267,9 @@
                    }[processed]
                 ))
     except:
-        log.err("Error while auto-processing iTIP: %s" % (failure.Failure(),))
-        raise iTipException
+        # FIXME: bare except
+        log.err("Error while auto-processing iTIP: %s" % (Failure(),))
+        raise iTipException()
     yield None
     return
 
@@ -286,7 +288,7 @@
     """
     log.info("Auto-processing iTIP ADD for: %s" % (str(principal),))
 
-    raise NotImplementedError
+    raise NotImplementedError()
 
 processAdd = deferredGenerator(processAdd)
 
@@ -371,8 +373,9 @@
                     d.getResult()
                     log.info("Delete calendar component %s in %s as it was cancelled." % (calmatch, calURL))
                 except:
-                    log.err("Error while auto-processing iTIP: %s" % (failure.Failure(),))
-                    raise iTipException
+                    # FIXME: bare except
+                    log.err("Error while auto-processing iTIP: %s" % (Failure(),))
+                    raise iTipException()
                 processed = "processed"
             else:
                 processed = "older"
@@ -460,8 +463,9 @@
                   }[processed]
                 ))
     except:
-        log.err("Error while auto-processing iTIP: %s" % (failure.Failure(),))
-        raise iTipException
+        # FIXME: bare except
+        log.err("Error while auto-processing iTIP: %s" % (Failure(),))
+        raise iTipException()
     yield None
     return
 
@@ -675,6 +679,7 @@
         yield d
         d.getResult()
     except:
+        # FIXME: bare except
         yield None
         return
     
@@ -757,8 +762,9 @@
                 d.getResult()
                 log.info("Deleted iTIP message %s in Inbox that was older than the new one." % (i[0],))
             except:
-                log.err("Error while auto-processing iTIP: %s" % (failure.Failure(),))
-                raise iTipException
+                # FIXME: bare except
+                log.err("Error while auto-processing iTIP: %s" % (Failure(),))
+                raise iTipException()
         else:
             # For any that are newer or the same, mark the new one to be deleted.
             delete_child = True
@@ -771,8 +777,9 @@
             d.getResult()
             log.info("Deleted new iTIP message %s in Inbox because it was older than existing ones." % (child.fp.basename(),))
         except:
-            log.err("Error while auto-processing iTIP: %s" % (failure.Failure(),))
-            raise iTipException
+            # FIXME: bare except
+            log.err("Error while auto-processing iTIP: %s" % (Failure(),))
+            raise iTipException()
     
     yield delete_child
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080525/64e9f78c/attachment.htm 


More information about the calendarserver-changes mailing list