python3: retrieve python-ldap major version number (#32399)

This commit is contained in:
Paul Marillonnet 2019-04-08 18:12:18 +02:00
parent d71b7533e1
commit e6ddc1cdd3
1 changed files with 1 additions and 1 deletions

View File

@ -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