helpers.ldap.connect(): raise LDAPException for every non-zero result

This commit is contained in:
Franzi 2021-12-21 09:58:05 +01:00
parent 026fbf3c58
commit bf5ba98ab8
Signed by: kunsi
GPG Key ID: 12E3D2136B818350
1 changed files with 3 additions and 0 deletions

View File

@ -83,6 +83,9 @@ def connect(user=None, password=None):
)
conn.bind()
if conn.result["result"] != 0:
raise LDAPException(conn.result["description"])
return conn