ldap: Add connection management to LDAPClient

Reviewed-By: Petr Viktorin <pviktori@redhat.com>
This commit is contained in:
Jan Cholasta
2015-04-16 06:58:31 +00:00
parent a849bca53f
commit 02e1ebe07c
2 changed files with 69 additions and 11 deletions
+4 -1
View File
@@ -98,11 +98,14 @@ class ldap2(LDAPClient, CrudBackend):
except AttributeError:
return DN()
def _init_connection(self):
def _connect(self):
# Connectible.conn is a proxy to thread-local storage;
# do not set it
pass
def _disconnect(self):
pass
def __del__(self):
if self.isconnected():
self.disconnect()