[CalendarServer-changes] [5520] CalendarServer/branches/users/wsanchez/transations/txcaldav/ calendarstore/file.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Apr 22 17:52:12 PDT 2010


Revision: 5520
          http://trac.macosforge.org/projects/calendarserver/changeset/5520
Author:   wsanchez at apple.com
Date:     2010-04-22 17:52:10 -0700 (Thu, 22 Apr 2010)
Log Message:
-----------
Redo calendarObjects()

Modified Paths:
--------------
    CalendarServer/branches/users/wsanchez/transations/txcaldav/calendarstore/file.py

Modified: CalendarServer/branches/users/wsanchez/transations/txcaldav/calendarstore/file.py
===================================================================
--- CalendarServer/branches/users/wsanchez/transations/txcaldav/calendarstore/file.py	2010-04-23 00:27:50 UTC (rev 5519)
+++ CalendarServer/branches/users/wsanchez/transations/txcaldav/calendarstore/file.py	2010-04-23 00:52:10 UTC (rev 5520)
@@ -278,21 +278,25 @@
     def ownerCalendarHome(self):
         return self.calendarHome
 
-    def _calendarObjects_index(self):
-        return self.index().calendarObjects()
+#    def _calendarObjects_index(self):
+#        return self.index().calendarObjects()
+#
+#    def _calendarObjects_listdir(self):
+#        return (
+#            self.calendarObjectWithName(name)
+#            for name in self.path.listdir()
+#            if not name.startswith(".")
+#        )
 
-    def _calendarObjects_listdir(self):
+    def calendarObjects(self):
         return (
             self.calendarObjectWithName(name)
-            for name in self.path.listdir()
-            if not name.startswith(".")
+            for name in (
+                set(self._newCalendarObjects.iterkeys()) |
+                set(name in self.path.listdir() if not name.startswith("."))
+            )
         )
 
-    def calendarObjects(self):
-        return set(self._newCalendarObjects.iterkeys()) | set(
-            self._calendarObjects_index()
-        )
-
     def calendarObjectWithName(self, name):
         if name in self._newCalendarObjects:
             return self._newCalendarObjects[name]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100422/99d09626/attachment.html>


More information about the calendarserver-changes mailing list