ldap2: remove URI argument from ldap2 constructor

LDAPClient should be used for ad-hoc connections, so the argument is not
necessary, and currently also unused.

Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
Jan Cholasta
2017-02-23 10:15:52 +00:00
committed by Martin Basti
parent 8f849a77f5
commit 4736fef6bb
2 changed files with 16 additions and 14 deletions

View File

@@ -67,19 +67,20 @@ class ldap2(CrudBackend, LDAPClient):
LDAP Backend Take 2.
"""
def __init__(self, api, ldap_uri=None):
if ldap_uri is None:
ldap_uri = api.env.ldap_uri
def __init__(self, api):
force_schema_updates = api.env.context in ('installer', 'updates')
CrudBackend.__init__(self, api)
LDAPClient.__init__(self, ldap_uri,
LDAPClient.__init__(self, None,
force_schema_updates=force_schema_updates)
self._time_limit = float(LDAPClient.time_limit)
self._size_limit = int(LDAPClient.size_limit)
@property
def ldap_uri(self):
return self.api.env.ldap_uri
@property
def time_limit(self):
if self._time_limit is None: