소스 검색

Catch all LDAP exceptions

Guillaume Ayoub 15 년 전
부모
커밋
f39d90caa9
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      radicale/acl/LDAP.py

+ 1 - 1
radicale/acl/LDAP.py

@@ -49,7 +49,7 @@ def has_right(owner, user, password):
         log.LOGGER.debug("User %s found" % user)
         try:
             CONNEXION.simple_bind_s(users[0][0], password or "")
-        except ldap.INVALID_CREDENTIALS:
+        except ldap.LDAPError:
             log.LOGGER.debug("Invalid credentials")
         else:
             log.LOGGER.debug("LDAP bind OK")