python3: retrieve python-ldap major version number (#32399)
This commit is contained in:
parent
d71b7533e1
commit
e6ddc1cdd3
|
@ -6,7 +6,7 @@ try:
|
|||
from ldap.dn import escape_dn_chars
|
||||
from ldap.ldapobject import ReconnectLDAPObject as NativeLDAPObject
|
||||
from ldap.controls import SimplePagedResultsControl
|
||||
PYTHON_LDAP3 = map(int, ldap.__version__.split('.')) >= [3]
|
||||
PYTHON_LDAP3 = list(map(int, ldap.__version__.split('.'))) >= [3]
|
||||
LDAPObject = NativeLDAPObject
|
||||
except ImportError:
|
||||
ldap = None
|
||||
|
|
Loading…
Reference in New Issue