summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pykolab/auth/ldap/__init__.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index f2d2738..cfbed90 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -232,6 +232,24 @@ class LDAP(pykolab.base.Base):
return False
+ except ldap.NO_SUCH_OBJECT:
+ log.error(
+ _("Invalid DN, username and/or password for '%s'.") % (
+ bind_dn
+ )
+ )
+
+ return False
+
+ except ldap.INVALID_CREDENTIALS:
+ log.error(
+ _("Invalid DN, username and/or password for '%s'.") % (
+ bind_dn
+ )
+ )
+
+ return False
+
except Exception, errmsg:
log.error(_("Exception occurred: %r") % (errmsg))
log.error(_("%s") % (traceback.format_exc()))