[CalendarServer-changes] [13476] CalendarServer/trunk

source_changes at macosforge.org source_changes at macosforge.org
Wed May 14 19:42:19 PDT 2014


Revision: 13476
          http://trac.calendarserver.org//changeset/13476
Author:   sagen at apple.com
Date:     2014-05-14 19:42:19 -0700 (Wed, 14 May 2014)
Log Message:
-----------
Eliminate a superfluous CompoundExpression if there is only one search token

Modified Paths:
--------------
    CalendarServer/trunk/requirements-stable.txt
    CalendarServer/trunk/txdav/who/directory.py

Modified: CalendarServer/trunk/requirements-stable.txt
===================================================================
--- CalendarServer/trunk/requirements-stable.txt	2014-05-15 02:40:33 UTC (rev 13475)
+++ CalendarServer/trunk/requirements-stable.txt	2014-05-15 02:42:19 UTC (rev 13476)
@@ -1,7 +1,7 @@
 # For CalendarServer development, don't try to get these projects from PyPI; use svn.
 
 -e .
--e svn+http://svn.calendarserver.org/repository/calendarserver/twext/trunk@13473#egg=twextpy
+-e svn+http://svn.calendarserver.org/repository/calendarserver/twext/trunk@13475#egg=twextpy
 -e svn+http://svn.calendarserver.org/repository/calendarserver/PyKerberos/trunk@13420#egg=kerberos
 -e svn+http://svn.calendarserver.org/repository/calendarserver/PyCalendar/trunk@13420#egg=pycalendar
 

Modified: CalendarServer/trunk/txdav/who/directory.py
===================================================================
--- CalendarServer/trunk/txdav/who/directory.py	2014-05-15 02:40:33 UTC (rev 13475)
+++ CalendarServer/trunk/txdav/who/directory.py	2014-05-15 02:42:19 UTC (rev 13476)
@@ -135,7 +135,12 @@
                     Operand.OR
                 )
             )
-        expression = CompoundExpression(outer, Operand.AND)
+
+        if len(outer) == 1:
+            expression = outer[0]
+        else:
+            expression = CompoundExpression(outer, Operand.AND)
+
         return self.recordsFromExpression(expression)
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140514/efd7f628/attachment.html>


More information about the calendarserver-changes mailing list