helpers.ldap.connect(): raise LDAPException for every non-zero result
This commit is contained in:
parent
026fbf3c58
commit
bf5ba98ab8
1 changed files with 3 additions and 0 deletions
|
@ -83,6 +83,9 @@ def connect(user=None, password=None):
|
|||
)
|
||||
conn.bind()
|
||||
|
||||
if conn.result["result"] != 0:
|
||||
raise LDAPException(conn.result["description"])
|
||||
|
||||
return conn
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue