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

source_changes at macosforge.org source_changes at macosforge.org
Fri May 9 14:27:28 PDT 2008


Revision: 2406
          http://trac.macosforge.org/projects/calendarserver/changeset/2406
Author:   cdaboo at apple.com
Date:     2008-05-09 14:27:27 -0700 (Fri, 09 May 2008)

Log Message:
-----------
More clean-up after notifications removal.

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

Modified: CalendarServer/trunk/twistedcaldav/dropbox.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/dropbox.py	2008-05-09 21:20:42 UTC (rev 2405)
+++ CalendarServer/trunk/twistedcaldav/dropbox.py	2008-05-09 21:27:27 UTC (rev 2406)
@@ -82,22 +82,3 @@
             responsecode.FORBIDDEN,
             (calendarserver_namespace, "valid-drop-box")
         )
-
-    def http_MKCALENDAR (self, request): 
-        return ErrorResponse( 
-            responsecode.FORBIDDEN, 
-            (calendarserver_namespace, "valid-drop-box") 
-        ) 
-
-class DropBoxChildResource (DAVResource):
-    def http_MKCOL(self, request):
-        return ErrorResponse(
-            responsecode.FORBIDDEN,
-            (calendarserver_namespace, "valid-drop-box-resource")
-        )
-
-    def http_MKCALENDAR (self, request): 
-        return ErrorResponse( 
-            responsecode.FORBIDDEN, 
-            (calendarserver_namespace, "valid-drop-box-resource") 
-        ) 

Modified: CalendarServer/trunk/twistedcaldav/static.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/static.py	2008-05-09 21:20:42 UTC (rev 2405)
+++ CalendarServer/trunk/twistedcaldav/static.py	2008-05-09 21:27:27 UTC (rev 2406)
@@ -58,7 +58,7 @@
 from twistedcaldav.index import Index, IndexSchedule
 from twistedcaldav.resource import CalDAVResource, isCalendarCollectionResource, isPseudoCalendarCollectionResource
 from twistedcaldav.schedule import ScheduleInboxResource, ScheduleOutboxResource
-from twistedcaldav.dropbox import DropBoxHomeResource, DropBoxCollectionResource, DropBoxChildResource
+from twistedcaldav.dropbox import DropBoxHomeResource, DropBoxCollectionResource
 from twistedcaldav.directory.calendar import uidsResourceName
 from twistedcaldav.directory.calendar import DirectoryCalendarHomeProvisioningResource
 from twistedcaldav.directory.calendar import DirectoryCalendarHomeTypeProvisioningResource
@@ -665,11 +665,8 @@
     def __repr__(self):
         return "<%s (dropbox collection): %s>" % (self.__class__.__name__, self.fp.path)
 
-    http_MKCALENDAR = DropBoxCollectionResource.http_MKCALENDAR
-
-class DropBoxChildFile (DropBoxChildResource, CalDAVFile):
+class DropBoxChildFile (CalDAVFile):
     def __init__(self, path, parent):
-        DropBoxChildResource.__init__(self)
         CalDAVFile.__init__(self, path, principalCollections=parent.principalCollections())
 
         assert self.fp.isfile() or not self.fp.exists()
@@ -680,9 +677,6 @@
         else:
             return responsecode.NOT_FOUND
 
-    http_MKCOL =      DropBoxChildResource.http_MKCOL 
-    http_MKCALENDAR = DropBoxChildResource.http_MKCALENDAR
-
 ##
 # Utilities
 ##
@@ -776,6 +770,11 @@
 
 bindMethods(twistedcaldav.method, CalDAVFile)
 
+# Some resources do not support some methods
+setattr(DropBoxCollectionFile, "http_MKCALENDAR", None)
+setattr(DropBoxChildFile, "http_MKCOL", None)
+setattr(DropBoxChildFile, "http_MKCALENDAR", None)
+
 # FIXME: Little bit of a circular dependency here...
 twistedcaldav.method.copymove.CalDAVFile = CalDAVFile
 twistedcaldav.method.delete.CalDAVFile   = CalDAVFile

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080509/796d1906/attachment-0001.html


More information about the calendarserver-changes mailing list