mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Update to python-ldap 3.0.0
Replace python3-pyldap with python3-ldap. Remove some old code for compatibility with very old python-ldap. Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
@@ -29,6 +29,7 @@ import contextlib
|
||||
import collections
|
||||
import os
|
||||
import pwd
|
||||
import warnings
|
||||
|
||||
# pylint: disable=import-error
|
||||
from six.moves.urllib.parse import urlparse
|
||||
@@ -76,6 +77,20 @@ TRUNCATED_ADMIN_LIMIT = object()
|
||||
DIRMAN_DN = DN(('cn', 'directory manager'))
|
||||
|
||||
|
||||
if six.PY2:
|
||||
# XXX silence python-ldap's BytesWarnings
|
||||
warnings.filterwarnings(
|
||||
action="ignore",
|
||||
message="Under Python 2, python-ldap uses bytes",
|
||||
category=BytesWarning
|
||||
)
|
||||
warnings.filterwarnings(
|
||||
action="ignore",
|
||||
message="Received non-bytes value",
|
||||
category=BytesWarning
|
||||
)
|
||||
|
||||
|
||||
class _ServerSchema(object):
|
||||
'''
|
||||
Properties of a schema retrieved from an LDAP server.
|
||||
|
Reference in New Issue
Block a user