[CalendarServer-changes] [8931] CalendarServer/trunk/twistedcaldav/directory/xmlfile.py

source_changes at macosforge.org source_changes at macosforge.org
Tue Mar 27 12:14:39 PDT 2012


Revision: 8931
          http://trac.macosforge.org/projects/calendarserver/changeset/8931
Author:   sagen at apple.com
Date:     2012-03-27 12:14:39 -0700 (Tue, 27 Mar 2012)
Log Message:
-----------
recordsMatchingFields is supposed to return a deferred (xml file implementation was not)

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/directory/xmlfile.py

Modified: CalendarServer/trunk/twistedcaldav/directory/xmlfile.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/directory/xmlfile.py	2012-03-26 23:23:47 UTC (rev 8930)
+++ CalendarServer/trunk/twistedcaldav/directory/xmlfile.py	2012-03-27 19:14:39 UTC (rev 8931)
@@ -30,6 +30,7 @@
 from twext.web2.auth.digest import DigestedCredentials
 from twext.python.filepath import CachingFilePath as FilePath
 from twistedcaldav.config import config
+from twisted.internet.defer import succeed
 
 from twistedcaldav.config import fullServerPath
 from twistedcaldav.directory.directory import DirectoryService, DirectoryRecord, DirectoryError
@@ -338,6 +339,7 @@
         else:
             recordTypes = (recordType,)
 
+        records = []
         for recordType in recordTypes:
             for xmlPrincipal in self._accounts()[recordType].itervalues():
                 if xmlPrincipalMatches(xmlPrincipal):
@@ -345,7 +347,8 @@
                     # Load/cache record from its GUID
                     record = self.recordWithGUID(xmlPrincipal.guid)
                     if record:
-                        yield record
+                        records.append(record)
+        return succeed(records)
 
 
     def _addElement(self, parent, principal):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120327/092694ea/attachment-0001.html>


More information about the calendarserver-changes mailing list