mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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:
committed by
Martin Basti
parent
8f849a77f5
commit
4736fef6bb
@@ -704,7 +704,16 @@ class LDAPClient(object):
|
||||
If true, attributes are decoded to Python types according to their
|
||||
syntax.
|
||||
"""
|
||||
self.ldap_uri = ldap_uri
|
||||
if ldap_uri is not None:
|
||||
self.ldap_uri = ldap_uri
|
||||
self.host = 'localhost'
|
||||
self.port = None
|
||||
url_data = urlparse(ldap_uri)
|
||||
self._protocol = url_data.scheme
|
||||
if self._protocol in ('ldap', 'ldaps'):
|
||||
self.host = url_data.hostname
|
||||
self.port = url_data.port
|
||||
|
||||
self._start_tls = start_tls
|
||||
self._force_schema_updates = force_schema_updates
|
||||
self._no_schema = no_schema
|
||||
@@ -712,14 +721,6 @@ class LDAPClient(object):
|
||||
self._cacert = cacert
|
||||
self._sasl_nocanon = sasl_nocanon
|
||||
|
||||
self.host = 'localhost'
|
||||
self.port = None
|
||||
url_data = urlparse(ldap_uri)
|
||||
self._protocol = url_data.scheme
|
||||
if self._protocol in ('ldap', 'ldaps'):
|
||||
self.host = url_data.hostname
|
||||
self.port = url_data.port
|
||||
|
||||
self.log = log_mgr.get_logger(self)
|
||||
self._has_schema = False
|
||||
self._schema = None
|
||||
|
Reference in New Issue
Block a user