[CalendarServer-changes] [13531] twext/trunk/twext/who/opendirectory/_service.py
source_changes at macosforge.org
source_changes at macosforge.org
Thu May 22 13:36:05 PDT 2014
Revision: 13531
http://trac.calendarserver.org//changeset/13531
Author: sagen at apple.com
Date: 2014-05-22 13:36:05 -0700 (Thu, 22 May 2014)
Log Message:
-----------
Don't pass a set( ) of recordTypes when building an OD query, pass a list.
Modified Paths:
--------------
twext/trunk/twext/who/opendirectory/_service.py
Modified: twext/trunk/twext/who/opendirectory/_service.py
===================================================================
--- twext/trunk/twext/who/opendirectory/_service.py 2014-05-21 23:09:51 UTC (rev 13530)
+++ twext/trunk/twext/who/opendirectory/_service.py 2014-05-22 20:36:05 UTC (rev 13531)
@@ -297,8 +297,8 @@
@param recordTypes: allowed OD record type strings
@type recordTypes: set(C{unicode})
- @return: tuple(OD query string, set(query's OD record type strings))
- @rtype: (C{unicode}, set(C{unicode}))
+ @return: tuple(OD query string, list(query's OD record type strings))
+ @rtype: (C{unicode}, list(C{unicode}))
"""
if recordTypes is None:
recordTypes = set([t.value for t in ODRecordType.iterconstants()])
@@ -346,13 +346,13 @@
queryTokens[:0] = (u"(")
queryTokens.append(u")")
- return (u"".join(queryTokens), recordTypes)
+ return (u"".join(queryTokens), list(recordTypes))
def _queryStringAndRecordTypesFromExpression(
self,
expression,
- recordTypes=set([t.value for t in ODRecordType.iterconstants()])
+ recordTypes=[t.value for t in ODRecordType.iterconstants()]
):
"""
Converts either a MatchExpression or a CompoundExpression into an LDAP
@@ -364,8 +364,8 @@
@param recordTypes: allowed OD record type strings
@type recordTypes: set(C{unicode})
- @return: tuple(OD query string, set(query's OD record type strings))
- @rtype: (C{unicode}, set(C{unicode}))
+ @return: tuple(OD query string, list(query's OD record type strings))
+ @rtype: (C{unicode}, list(C{unicode}))
"""
if isinstance(expression, MatchExpression):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140522/67572852/attachment.html>
More information about the calendarserver-changes
mailing list