[CalendarServer-changes] [846] CalendarServer/trunk/twistedcaldav

source_changes at macosforge.org source_changes at macosforge.org
Fri Dec 15 20:21:40 PST 2006


Revision: 846
          http://trac.macosforge.org/projects/calendarserver/changeset/846
Author:   wsanchez at apple.com
Date:     2006-12-15 20:21:40 -0800 (Fri, 15 Dec 2006)

Log Message:
-----------
Make all implementations of provisionChild() take a name argument.

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

Modified: CalendarServer/trunk/twistedcaldav/directory/calendar.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/directory/calendar.py	2006-12-16 03:48:58 UTC (rev 845)
+++ CalendarServer/trunk/twistedcaldav/directory/calendar.py	2006-12-16 04:21:40 UTC (rev 846)
@@ -26,7 +26,6 @@
     "DirectoryCalendarHomeResource",
 ]
 
-from twisted.internet.defer import succeed
 from twisted.web2.dav import davxml
 from twisted.web2.dav.util import joinURL
 from twisted.web2.dav.resource import TwistedACLInheritable, TwistedQuotaRootProperty
@@ -138,7 +137,7 @@
             assert name is None
             name = record.shortName
 
-        return self.provisionChild(record)
+        return self.provisionChild(name)
 
     def listChildren(self):
         return (record.shortName for record in self.directory.listRecords(self.recordType))

Modified: CalendarServer/trunk/twistedcaldav/static.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/static.py	2006-12-16 03:48:58 UTC (rev 845)
+++ CalendarServer/trunk/twistedcaldav/static.py	2006-12-16 04:21:40 UTC (rev 846)
@@ -400,8 +400,8 @@
         DAVFile.__init__(self, path)
         DirectoryCalendarHomeProvisioningResource.__init__(self, directory, url)
 
-    def provisionChild(self, recordType):
-        return CalendarHomeTypeProvisioningFile(self.fp.child(recordType).path, self, recordType)
+    def provisionChild(self, name):
+        return CalendarHomeTypeProvisioningFile(self.fp.child(name).path, self, name)
 
     def createSimilarFile(self, path):
         raise HTTPError(responsecode.NOT_FOUND)
@@ -420,8 +420,8 @@
         DAVFile.__init__(self, path)
         DirectoryCalendarHomeTypeProvisioningResource.__init__(self, parent, recordType)
 
-    def provisionChild(self, record):
-        child = CalendarHomeFile(self.fp.child(record.shortName).path, self, record)
+    def provisionChild(self, name):
+        child = CalendarHomeFile(self.fp.child(name).path, self, self.directory.recordWithShortName(self.recordType, name))
         if not child.exists():
             return child.provisionDefaultCalendars()
         return child

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


More information about the calendarserver-changes mailing list