Use ldap.initialize instead of ldap.open for compatibility with python-ldap 3.2.0.
[mirror/userdir-ldap.git] / userdir_ldap.py
index eb27ecb..22722e4 100644 (file)
@@ -135,7 +135,7 @@ def connectLDAP(server=None):
    if server is None:
       global LDAPServer
       server = LDAPServer
-   lc = ldap.open(server)
+   lc = ldap.initialize('ldap://%s' % server)
    global UseSSL
    if UseSSL:
       lc.start_tls_s()