[CalendarServer-changes] [12584] twext/trunk/twext/who
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 12 11:20:28 PDT 2014
Revision: 12584
http://trac.calendarserver.org//changeset/12584
Author: wsanchez at apple.com
Date: 2014-02-05 16:55:13 -0800 (Wed, 05 Feb 2014)
Log Message:
-----------
Get rid of iterFlags()
Modified Paths:
--------------
twext/trunk/twext/who/expression.py
twext/trunk/twext/who/ldap/_util.py
twext/trunk/twext/who/opendirectory/_service.py
twext/trunk/twext/who/util.py
Modified: twext/trunk/twext/who/expression.py
===================================================================
--- twext/trunk/twext/who/expression.py 2014-02-06 00:45:30 UTC (rev 12583)
+++ twext/trunk/twext/who/expression.py 2014-02-06 00:55:13 UTC (rev 12584)
@@ -33,7 +33,7 @@
)
from .idirectory import FieldName
-from .util import iterFlags, describe
+from .util import describe
#
@@ -129,7 +129,7 @@
if flags is None:
flags = FlagConstant()
else:
- for flag in iterFlags(flags):
+ for flag in flags:
if flag == MatchFlags.NOT:
predicate = lambda x: not x
elif flag == MatchFlags.caseInsensitive:
Modified: twext/trunk/twext/who/ldap/_util.py
===================================================================
--- twext/trunk/twext/who/ldap/_util.py 2014-02-06 00:45:30 UTC (rev 12583)
+++ twext/trunk/twext/who/ldap/_util.py 2014-02-06 00:55:13 UTC (rev 12584)
@@ -20,7 +20,6 @@
CompoundExpression, Operand,
MatchExpression, MatchFlags,
)
-from ..util import iterFlags
from ._constants import LDAPOperand, LDAPMatchType, LDAPMatchFlags
@@ -82,7 +81,7 @@
"Unknown match type: {0}".format(matchType)
)
- flags = tuple(iterFlags(expression.flags))
+ flags = tuple(expression.flags)
if MatchFlags.NOT in flags:
notOp = LDAPMatchFlags.NOT.value
Modified: twext/trunk/twext/who/opendirectory/_service.py
===================================================================
--- twext/trunk/twext/who/opendirectory/_service.py 2014-02-06 00:45:30 UTC (rev 12583)
+++ twext/trunk/twext/who/opendirectory/_service.py 2014-02-06 00:55:13 UTC (rev 12584)
@@ -44,7 +44,7 @@
MatchExpression, MatchFlags,
)
from ..ldap._util import LDAP_QUOTING_TABLE
-from ..util import iterFlags, ConstantsContainer
+from ..util import ConstantsContainer
from ._odframework import ODSession, ODNode, ODQuery
from ._constants import (
@@ -226,7 +226,7 @@
"Unknown match type: {0}".format(matchType)
)
- flags = tuple(iterFlags(expression.flags))
+ flags = tuple(expression.flags)
if MatchFlags.NOT in flags:
notOp = u"!"
@@ -370,7 +370,7 @@
)
matchType = matchType.value
- flags = tuple(iterFlags(expression.flags))
+ flags = tuple(expression.flags)
if MatchFlags.NOT in flags:
raise NotImplementedError()
Modified: twext/trunk/twext/who/util.py
===================================================================
--- twext/trunk/twext/who/util.py 2014-02-06 00:45:30 UTC (rev 12583)
+++ twext/trunk/twext/who/util.py 2014-02-06 00:55:13 UTC (rev 12584)
@@ -23,7 +23,6 @@
"ConstantsContainer",
"uniqueResult",
"describe",
- "iterFlags",
]
from inspect import getmembers, isclass, isfunction
@@ -157,10 +156,5 @@
-def iterFlags(flags):
- return iter(flags)
-
-
-
CONTAINER_CLASSES = (Names, Values, Flags)
CONSTANT_CLASSES = (NamedConstant, ValueConstant, FlagConstant)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/ed2eb328/attachment.html>
More information about the calendarserver-changes
mailing list