summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorChristoph Witzany <christoph@web.crofting.com>2016-04-06 17:44:03 +0200
committerChristoph Witzany <christoph@web.crofting.com>2016-04-06 18:23:46 +0200
commit67f3a50e9ae68b66b465b5b4b86bc81da625d1e6 (patch)
treebbb33ebca784a4b43059e606801c594f9e3d6ad4 /synapse
parentcode style (diff)
downloadsynapse-67f3a50e9ae68b66b465b5b4b86bc81da625d1e6.tar.xz
fix exception handling
Diffstat (limited to '')
-rw-r--r--synapse/handlers/auth.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py
index 37cbaa0b46..0e6b7c9e26 100644
--- a/synapse/handlers/auth.py
+++ b/synapse/handlers/auth.py
@@ -437,7 +437,7 @@ class AuthHandler(BaseHandler):
         try:
             user_id, password_hash = yield self._find_user_id_and_pwd_hash(user_id)
             defer.returnValue(not self.validate_hash(password, password_hash))
-        except:
+        except LoginError:
             defer.returnValue(False)
 
     @defer.inlineCallbacks
@@ -473,7 +473,7 @@ class AuthHandler(BaseHandler):
 
             defer.returnValue(True)
         except ldap.LDAPError, e:
-            logger.info("LDAP error: %s" % e)
+            logger.warn("LDAP error: %s", e)
             defer.returnValue(False)
 
     @defer.inlineCallbacks