summary refs log tree commit diff
path: root/synapse/handlers/auth.py
diff options
context:
space:
mode:
authorChristoph Witzany <christoph@web.crofting.com>2016-04-06 18:10:14 +0200
committerChristoph Witzany <christoph@web.crofting.com>2016-04-06 18:23:46 +0200
commit27a0c21c38f83572f984b9556ab5740a91428caf (patch)
tree8e96210ddc4b89b1eb0ce8937f2ed7e8ce0a4bcd /synapse/handlers/auth.py
parentoutput ldap version for info and to pacify pep8 (diff)
downloadsynapse-27a0c21c38f83572f984b9556ab5740a91428caf.tar.xz
make tests for ldap more specific to not be fooled by Mocks
Diffstat (limited to 'synapse/handlers/auth.py')
-rw-r--r--synapse/handlers/auth.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py
index cae81dbd67..f3acdf00da 100644
--- a/synapse/handlers/auth.py
+++ b/synapse/handlers/auth.py
@@ -58,7 +58,7 @@ class AuthHandler(BaseHandler):
         self.ldap_email_property = hs.config.ldap_email_property
         self.ldap_full_name_property = hs.config.ldap_full_name_property
 
-        if self.ldap_enabled:
+        if self.ldap_enabled is True:
             import ldap
             logger.info("Import ldap version: %s", ldap.__version__)
 
@@ -444,8 +444,8 @@ class AuthHandler(BaseHandler):
 
     @defer.inlineCallbacks
     def _check_ldap_password(self, user_id, password):
-        if not self.ldap_enabled:
-            logger.info("LDAP not configured")
+        if self.ldap_enabled is not True:
+            logger.debug("LDAP not configured")
             defer.returnValue(False)
 
         import ldap