[CalendarServer-changes] [13282] twext/trunk/twext/who/opendirectory/_service.py
source_changes at macosforge.org
source_changes at macosforge.org
Tue Apr 15 14:12:27 PDT 2014
Revision: 13282
http://trac.calendarserver.org//changeset/13282
Author: wsanchez at apple.com
Date: 2014-04-15 14:12:27 -0700 (Tue, 15 Apr 2014)
Log Message:
-----------
Avoid if else
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-04-15 20:42:44 UTC (rev 13281)
+++ twext/trunk/twext/who/opendirectory/_service.py 2014-04-15 21:12:27 UTC (rev 13282)
@@ -367,6 +367,11 @@
if not recordTypes:
return None
+ if queryString:
+ matchType = ODMatchType.compound.value
+ else:
+ matchType = ODMatchType.any.value
+
attributes = [a.value for a in ODAttribute.iterconstants()]
maxResults = 0
@@ -374,7 +379,7 @@
self.node,
(t.value for t in recordTypes),
None,
- ODMatchType.compound.value if queryString else ODMatchType.any.value,
+ matchType,
queryString,
attributes,
maxResults,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140415/897439ab/attachment.html>
More information about the calendarserver-changes
mailing list