I am Batman

This commit is contained in:
Kload 2013-11-28 17:16:18 +01:00
parent 7d6722511f
commit b3702f5dee

View file

@ -269,7 +269,7 @@ class YunoHostLDAP(Singleton):
if anonymous: if anonymous:
self.conn.simple_bind_s() self.conn.simple_bind_s()
self.connected = True self.connected = True
elif self.connected: elif self.connected and not password:
pass pass
else: else:
if password: if password:
@ -316,6 +316,8 @@ class YunoHostLDAP(Singleton):
""" """
try: try:
self.connected = False
self.pwd = False
self.conn.unbind_s() self.conn.unbind_s()
except: except:
raise YunoHostError(169, _('An error occured during disconnection')) raise YunoHostError(169, _('An error occured during disconnection'))