[CalendarServer-changes] [573] CalendarServer/branches/users/wsanchez/provisioning-2/twistedcaldav/ resource.py

source_changes at macosforge.org source_changes at macosforge.org
Wed Nov 22 15:50:23 PST 2006


Revision: 573
          http://trac.macosforge.org/projects/calendarserver/changeset/573
Author:   wsanchez at apple.com
Date:     2006-11-22 15:50:23 -0800 (Wed, 22 Nov 2006)

Log Message:
-----------
Don't look up the same value twice.

Modified Paths:
--------------
    CalendarServer/branches/users/wsanchez/provisioning-2/twistedcaldav/resource.py

Modified: CalendarServer/branches/users/wsanchez/provisioning-2/twistedcaldav/resource.py
===================================================================
--- CalendarServer/branches/users/wsanchez/provisioning-2/twistedcaldav/resource.py	2006-11-22 23:39:28 UTC (rev 572)
+++ CalendarServer/branches/users/wsanchez/provisioning-2/twistedcaldav/resource.py	2006-11-22 23:50:23 UTC (rev 573)
@@ -286,15 +286,14 @@
     authorizationPrincipal = deferredGenerator(authorizationPrincipal)
 
     def principalCollections(self, request):
-        """
-        Get the values cached in CalendarPrincipalCollectionResource.
-        """
+        # Get the values cached in CalendarPrincipalCollectionResource.
         collections = CalendarPrincipalCollectionResource.principleCollectionSet.keys()
         if collections:
-            return succeed(CalendarPrincipalCollectionResource.principleCollectionSet.keys())
-        else:
-            return super(CalDAVResource, self).principalCollections(request)
+            return succeed(collections)
 
+        # Fall back to super's implementation.
+        return super(CalDAVResource, self).principalCollections(request)
+
     ##
     # CalDAV
     ##

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


More information about the calendarserver-changes mailing list