[CalendarServer-changes] [14284] CalendarServer/trunk

source_changes at macosforge.org source_changes at macosforge.org
Mon Jan 12 13:23:25 PST 2015


Revision: 14284
          http://trac.calendarserver.org//changeset/14284
Author:   sagen at apple.com
Date:     2015-01-12 13:23:25 -0800 (Mon, 12 Jan 2015)
Log Message:
-----------
Only import ldap if we're configured for it; remove as submission requirement

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

Modified: CalendarServer/trunk/requirements-stable.txt
===================================================================
--- CalendarServer/trunk/requirements-stable.txt	2015-01-12 20:07:47 UTC (rev 14283)
+++ CalendarServer/trunk/requirements-stable.txt	2015-01-12 21:23:25 UTC (rev 14284)
@@ -32,13 +32,12 @@
             characteristic==14.0.0
             pyasn1==0.1.7
             pyasn1-modules==0.0.5
-            #pyOpenSSL  
+            #pyOpenSSL
         pycrypto==2.6.1
 
     -e svn+http://svn.calendarserver.org/repository/calendarserver/twext/trunk@14260#egg=twextpy
         cffi==0.8.6
             pycparser==2.10
-        python-ldap==2.4.18
         #twisted
         # [DAL] extra
               sqlparse==0.1.14

Modified: CalendarServer/trunk/txdav/who/util.py
===================================================================
--- CalendarServer/trunk/txdav/who/util.py	2015-01-12 20:07:47 UTC (rev 14283)
+++ CalendarServer/trunk/txdav/who/util.py	2015-01-12 21:23:25 UTC (rev 14284)
@@ -21,11 +21,6 @@
 from twext.who.idirectory import (
     FieldName as BaseFieldName, RecordType, DirectoryConfigurationError
 )
-from twext.who.ldap import (
-    DirectoryService as LDAPDirectoryService,
-    FieldName as LDAPFieldName,
-    RecordTypeSchema
-)
 from twext.who.util import ConstantsContainer
 from twisted.cred.credentials import UsernamePassword
 from twisted.python.filepath import FilePath
@@ -129,6 +124,12 @@
             directory = ODDirectoryService(nodeName=node, suppressSystemRecords=True)
 
         elif "ldap" in directoryType:
+            from twext.who.ldap import (
+                DirectoryService as LDAPDirectoryService,
+                FieldName as LDAPFieldName,
+                RecordTypeSchema
+            )
+
             if params.credentials.dn and params.credentials.password:
                 creds = UsernamePassword(
                     params.credentials.dn,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150112/25a607fe/attachment.html>


More information about the calendarserver-changes mailing list