[CalendarServer-changes] [13291] twext/trunk/twext/who/ldap/_service.py

source_changes at macosforge.org source_changes at macosforge.org
Tue Apr 15 15:28:11 PDT 2014


Revision: 13291
          http://trac.calendarserver.org//changeset/13291
Author:   wsanchez at apple.com
Date:     2014-04-15 15:28:11 -0700 (Tue, 15 Apr 2014)
Log Message:
-----------
simpify a bit

Modified Paths:
--------------
    twext/trunk/twext/who/ldap/_service.py

Modified: twext/trunk/twext/who/ldap/_service.py
===================================================================
--- twext/trunk/twext/who/ldap/_service.py	2014-04-15 22:12:36 UTC (rev 13290)
+++ twext/trunk/twext/who/ldap/_service.py	2014-04-15 22:28:11 UTC (rev 13291)
@@ -495,10 +495,7 @@
                     if valueType in (unicode, UUID):
                         if not isinstance(value, list):
                             value = [value]
-                        newValue = []
-                        for singleValue in value:
-                            singleValue = valueType(singleValue)
-                            newValue.append(singleValue)
+                        newValue = [valueType(v) for v in value]
                         if not self.fieldName.isMultiValue(fieldName):
                             newValue = newValue[0]
                         fields[fieldName] = newValue
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140415/930cd6f5/attachment.html>


More information about the calendarserver-changes mailing list