[CalendarServer-changes] [1525] CalendarServer/trunk/twistedcaldav/extensions.py

source_changes at macosforge.org source_changes at macosforge.org
Mon May 14 12:37:22 PDT 2007


Revision: 1525
          http://trac.macosforge.org/projects/calendarserver/changeset/1525
Author:   wsanchez at apple.com
Date:     2007-05-14 12:37:21 -0700 (Mon, 14 May 2007)

Log Message:
-----------
Catch exceptions in readProperty as well as errbacks.

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

Modified: CalendarServer/trunk/twistedcaldav/extensions.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/extensions.py	2007-05-14 17:32:02 UTC (rev 1524)
+++ CalendarServer/trunk/twistedcaldav/extensions.py	2007-05-14 19:37:21 UTC (rev 1525)
@@ -289,21 +289,21 @@
             return davxml.ResourceType.collection
         return davxml.ResourceType.empty
 
-    def render(self, req):
+    def render(self, request):
         if not self.fp.exists():
             return responsecode.NOT_FOUND
 
         if self.fp.isdir():
-            if req.uri[-1] != "/":
+            if request.uri[-1] != "/":
                 # Redirect to include trailing '/' in URI
-                return RedirectResponse(req.unparseURL(path=req.path+'/'))
+                return RedirectResponse(request.unparseURL(path=request.path+'/'))
             else:
                 ifp = self.fp.childSearchPreauth(*self.indexNames)
                 if ifp:
                     # Render from the index file
-                    return self.createSimilarFile(ifp.path).render(req)
+                    return self.createSimilarFile(ifp.path).render(request)
 
-                return self.renderDirectory(req)
+                return self.renderDirectory(request)
 
         try:
             f = self.fp.open()
@@ -430,9 +430,9 @@
         def gotProperties(qnames):
             even = False
             for qname in qnames:
-                property = waitForDeferred(self.readProperty(qname, request))
-                yield property
                 try:
+                    property = waitForDeferred(self.readProperty(qname, request))
+                    yield property
                     property = property.getResult()
                     name = property.sname()
                     value = property.toxml()

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20070514/dda25e56/attachment.html


More information about the calendarserver-changes mailing list