[CalendarServer-changes] [4717] CalendarServer/trunk/twistedcaldav/directory/appleopendirectory.py

source_changes at macosforge.org source_changes at macosforge.org
Fri Nov 6 11:40:37 PST 2009


Revision: 4717
          http://trac.macosforge.org/projects/calendarserver/changeset/4717
Author:   sagen at apple.com
Date:     2009-11-06 11:40:36 -0800 (Fri, 06 Nov 2009)
Log Message:
-----------
When processing principal_property_search results, AD seems to return "No Record
Name" for the record name.  This was causing some records to not be seen by cale
ndar server.  Now the results are processed by a list, rather than a dict, avoid
ing the problem.

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

Modified: CalendarServer/trunk/twistedcaldav/directory/appleopendirectory.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/directory/appleopendirectory.py	2009-11-06 19:24:51 UTC (rev 4716)
+++ CalendarServer/trunk/twistedcaldav/directory/appleopendirectory.py	2009-11-06 19:40:36 UTC (rev 4717)
@@ -369,7 +369,7 @@
 
         def collectResults(results):
             self.log_info("Got back %d records from OD" % (len(results),))
-            for key, val in results.iteritems():
+            for key, val in results:
                 self.log_debug("OD result: %s %s" % (key, val))
                 try:
                     guid = val[dsattributes.kDS1AttrGeneratedUID]
@@ -380,7 +380,7 @@
                     pass
 
         def multiQuery(directory, queries, attrs, operand):
-            results = {}
+            results = []
 
             for query, recordTypes in queries.iteritems():
                 if not query:
@@ -401,8 +401,8 @@
                 self.log_info("Calling OD: Types %s, Operand %s, Caseless %s, %s" %
                     (recordTypes, operand, caseless, complexExpression))
 
-                results.update(
-                    opendirectory.queryRecordsWithAttributes(
+                results.extend(
+                    opendirectory.queryRecordsWithAttributes_list(
                         directory,
                         complexExpression,
                         caseless,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20091106/a913a84f/attachment.html>


More information about the calendarserver-changes mailing list