[CalendarServer-changes] [5766] CalendarServer/branches/new-store/twistedcaldav/static.py

source_changes at macosforge.org source_changes at macosforge.org
Wed Jun 16 18:51:38 PDT 2010


Revision: 5766
          http://trac.macosforge.org/projects/calendarserver/changeset/5766
Author:   cdaboo at apple.com
Date:     2010-06-16 18:51:33 -0700 (Wed, 16 Jun 2010)
Log Message:
-----------
Handle non-existing record case.

Modified Paths:
--------------
    CalendarServer/branches/new-store/twistedcaldav/static.py

Modified: CalendarServer/branches/new-store/twistedcaldav/static.py
===================================================================
--- CalendarServer/branches/new-store/twistedcaldav/static.py	2010-06-17 01:17:46 UTC (rev 5765)
+++ CalendarServer/branches/new-store/twistedcaldav/static.py	2010-06-17 01:51:33 UTC (rev 5766)
@@ -907,9 +907,11 @@
             return (self, ())
 
         record = self.directory.recordWithUID(name)
-        return (self.homeResourceForRecord(record, request), segments[1:])
+        if record:
+            return (self.homeResourceForRecord(record, request), segments[1:])
+        else:
+            return (None, ())
 
-
     def homeResourceForRecord(self, record, request):
         self.provision()
         TRANSACTION_KEY = '_newStoreTransaction'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100616/8d62496e/attachment.html>


More information about the calendarserver-changes mailing list