summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2016-02-16 08:11:10 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2016-02-16 08:11:10 +0100
commit3be27a39d4f8fca6c7ae15842e75bec57c890c88 (patch)
treedf9bd7753bae14278eb537909d5b982832384dac
parent967ca93ef8cea9070eacb4eb51f922d52cfb5ba5 (diff)
downloadpykolab-3be27a39d4f8fca6c7ae15842e75bec57c890c88.tar.gz
Catch errmsg when the LDAP server is not available (#5333)
-rw-r--r--pykolab/auth/ldap/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index f0ce2f7..f9e27ff 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -1195,7 +1195,7 @@ class LDAP(pykolab.base.Base):
try:
self.ldap.simple_bind_s(bind_dn, bind_pw)
self.bind = True
- except ldap.SERVER_DOWN:
+ except ldap.SERVER_DOWN, errmsg:
log.error(_("LDAP server unavailable: %r") % (errmsg))
log.error(_("%s") % (traceback.format_exc()))
except ldap.INVALID_CREDENTIALS: