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

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