[CalendarServer-changes] [954] CalendarServer/branches/users/cdaboo/cuproxy-857/twistedcaldav

source_changes at macosforge.org source_changes at macosforge.org
Fri Jan 5 18:57:34 PST 2007


Revision: 954
          http://trac.macosforge.org/projects/calendarserver/changeset/954
Author:   cdaboo at apple.com
Date:     2007-01-05 18:57:34 -0800 (Fri, 05 Jan 2007)

Log Message:
-----------
Move self.parent into the resource class from the file class for consistency with directory
classes.

Modified Paths:
--------------
    CalendarServer/branches/users/cdaboo/cuproxy-857/twistedcaldav/schedule.py
    CalendarServer/branches/users/cdaboo/cuproxy-857/twistedcaldav/static.py

Modified: CalendarServer/branches/users/cdaboo/cuproxy-857/twistedcaldav/schedule.py
===================================================================
--- CalendarServer/branches/users/cdaboo/cuproxy-857/twistedcaldav/schedule.py	2007-01-06 02:05:29 UTC (rev 953)
+++ CalendarServer/branches/users/cdaboo/cuproxy-857/twistedcaldav/schedule.py	2007-01-06 02:57:34 UTC (rev 954)
@@ -57,6 +57,16 @@
     Extends L{DAVResource} to provide CalDAV scheduling collection
     functionality.
     """
+    def __init__(self, parent):
+        """
+        @param parent: the parent resource of this one.
+        """
+        assert parent is not None
+
+        CalDAVResource.__init__(self, principalCollections=parent.principalCollections())
+
+        self.parent = parent
+
     def isCollection(self):
         return True
 

Modified: CalendarServer/branches/users/cdaboo/cuproxy-857/twistedcaldav/static.py
===================================================================
--- CalendarServer/branches/users/cdaboo/cuproxy-857/twistedcaldav/static.py	2007-01-06 02:05:29 UTC (rev 953)
+++ CalendarServer/branches/users/cdaboo/cuproxy-857/twistedcaldav/static.py	2007-01-06 02:57:34 UTC (rev 954)
@@ -490,7 +490,6 @@
 class ScheduleFile (AutoProvisioningFileMixIn, CalDAVFile):
     def __init__(self, path, parent):
         super(ScheduleFile, self).__init__(path, principalCollections=parent.principalCollections())
-        self.parent = parent
 
     def isCollection(self):
         return True
@@ -527,6 +526,10 @@
     """
     Calendar scheduling inbox collection resource.
     """
+    def __init__(self, path, parent):
+        ScheduleFile.__init__(self, path, parent)
+        ScheduleInboxResource.__init__(self, parent)
+
     def provision(self):
         if self.provisionFile():
             # FIXME: This should probably be a directory record option that
@@ -545,6 +548,10 @@
     """
     Calendar scheduling outbox collection resource.
     """
+    def __init__(self, path, parent):
+        ScheduleFile.__init__(self, path, parent)
+        ScheduleOutboxResource.__init__(self, parent)
+
     def __repr__(self):
         return "<%s (calendar outbox collection): %s>" % (self.__class__.__name__, self.fp.path)
 

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


More information about the calendarserver-changes mailing list