[CalendarServer-changes] [856] CalendarServer/trunk/twistedcaldav/static.py

source_changes at macosforge.org source_changes at macosforge.org
Mon Dec 18 20:38:58 PST 2006


Revision: 856
          http://trac.macosforge.org/projects/calendarserver/changeset/856
Author:   wsanchez at apple.com
Date:     2006-12-18 20:38:58 -0800 (Mon, 18 Dec 2006)

Log Message:
-----------
Be more assertive

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

Modified: CalendarServer/trunk/twistedcaldav/static.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/static.py	2006-12-19 04:35:34 UTC (rev 855)
+++ CalendarServer/trunk/twistedcaldav/static.py	2006-12-19 04:38:58 UTC (rev 856)
@@ -425,7 +425,9 @@
         DirectoryCalendarHomeTypeProvisioningResource.__init__(self, parent, recordType)
 
     def provisionChild(self, name):
-        child = CalendarHomeFile(self.fp.child(name).path, self, self.directory.recordWithShortName(self.recordType, name))
+        record = self.directory.recordWithShortName(self.recordType, name)
+        assert record is not None, "No directory record %r of type %r" % (name, self.recordType)
+        child = CalendarHomeFile(self.fp.child(name).path, self, record)
         if not child.exists():
             # NOTE: provisionDefaultCalendars() returns a deferred, which we are ignoring.
             # The result being that the default calendars will be present at some point

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


More information about the calendarserver-changes mailing list