summary refs log tree commit diff
path: root/synapse/appservice
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2015-02-09 15:01:28 +0000
committerKegan Dougal <kegan@matrix.org>2015-02-09 15:01:28 +0000
commitf7cac2f7b699fb3bb58c02fa1828aeec6c319f01 (patch)
tree34d975546d13d888fe42832f21a6db16a9c19948 /synapse/appservice
parentRemove unused imports. (diff)
downloadsynapse-f7cac2f7b699fb3bb58c02fa1828aeec6c319f01.tar.xz
Fix bugs so lazy room joining works as intended.
Diffstat (limited to 'synapse/appservice')
-rw-r--r--synapse/appservice/api.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/appservice/api.py b/synapse/appservice/api.py
index 9cce4e0973..15ac1e27fc 100644
--- a/synapse/appservice/api.py
+++ b/synapse/appservice/api.py
@@ -41,7 +41,7 @@ class ApplicationServiceApi(SimpleHttpClient):
             response = yield self.get_json(uri, {
                 "access_token": service.hs_token
             })
-            if response:  # just an empty json object
+            if response is not None:  # just an empty json object
                 defer.returnValue(True)
         except CodeMessageException as e:
             if e.code == 404:
@@ -60,13 +60,13 @@ class ApplicationServiceApi(SimpleHttpClient):
             response = yield self.get_json(uri, {
                 "access_token": service.hs_token
             })
-            if response:  # just an empty json object
+            if response is not None:  # just an empty json object
                 defer.returnValue(True)
         except CodeMessageException as e:
+            logger.warning("query_alias to %s received %s", uri, e.code)
             if e.code == 404:
                 defer.returnValue(False)
                 return
-            logger.warning("query_alias to %s received %s", uri, e.code)
         except Exception as ex:
             logger.warning("query_alias to %s threw exception %s", uri, ex)
         defer.returnValue(False)