[CalendarServer-changes] [426]
CalendarServer/branches/users/wsanchez/provisioning/twistedcaldav/
static.py
source_changes at macosforge.org
source_changes at macosforge.org
Fri Nov 10 13:38:51 PST 2006
Revision: 426
http://trac.macosforge.org/projects/calendarserver/changeset/426
Author: wsanchez at apple.com
Date: 2006-11-10 13:38:50 -0800 (Fri, 10 Nov 2006)
Log Message:
-----------
Add url param to CalendarHomeProvisioningFile's init and add accessor.
Register the CalendarHomeProvisioningFile with the directory.
Modified Paths:
--------------
CalendarServer/branches/users/wsanchez/provisioning/twistedcaldav/static.py
Modified: CalendarServer/branches/users/wsanchez/provisioning/twistedcaldav/static.py
===================================================================
--- CalendarServer/branches/users/wsanchez/provisioning/twistedcaldav/static.py 2006-11-10 19:14:03 UTC (rev 425)
+++ CalendarServer/branches/users/wsanchez/provisioning/twistedcaldav/static.py 2006-11-10 21:38:50 UTC (rev 426)
@@ -419,7 +419,7 @@
"""
L{CalDAVFile} resource which provisions calendar home collections as needed.
"""
- def __init__(self, path, directory):
+ def __init__(self, path, directory, url):
"""
@param path: the path to the file which will back the resource.
@param directory: an L{IDirectoryService} to provision calendars from.
@@ -427,7 +427,14 @@
super(CalendarHomeProvisioningFile, self).__init__(path)
self.directory = IDirectoryService(directory)
+ self._url = url
+ # FIXME: Smells like a hack
+ directory.calendarHomesCollection = self
+
+ def url(self):
+ return self._url
+
def createSimilarFile(self, path):
raise HTTPError(responsecode.NOT_FOUND)
@@ -501,7 +508,7 @@
return CalendarHomeFile(child_fp.path, self, record)
def listChildren(self):
- return [record.shortName for record in self.directory.listRecords(self.recordType)]
+ return (record.shortName for record in self.directory.listRecords(self.recordType))
def principalCollections(self, request):
return self._parent.principalCollections(request)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20061110/67e20794/attachment.html
More information about the calendarserver-changes
mailing list