summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2016-08-30 17:20:31 +0100
committerKegan Dougal <kegan@matrix.org>2016-08-30 17:20:31 +0100
commitc88278353512d778f460d8223a2ff173323e8f94 (patch)
tree58b6eb93014cf90dbb30c781aa804ee048e5f72e /synapse/config
parentUse None instead of the empty string (diff)
downloadsynapse-c88278353512d778f460d8223a2ff173323e8f94.tar.xz
flake8
Diffstat (limited to 'synapse/config')
-rw-r--r--synapse/config/appservice.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/config/appservice.py b/synapse/config/appservice.py
index 759209a85b..d7537e8d44 100644
--- a/synapse/config/appservice.py
+++ b/synapse/config/appservice.py
@@ -96,7 +96,8 @@ def _load_appservice(hostname, as_info, config_filename):
 
     # 'url' must either be a string or explicitly null, not missing
     # to avoid accidentally turning off push for ASes.
-    if not isinstance(as_info.get("url"), basestring) and as_info.get("url", "") is not None:
+    if (not isinstance(as_info.get("url"), basestring) and
+            as_info.get("url", "") is not None):
         raise KeyError(
             "Required string field or explicit null: 'url' (%s)" % (config_filename,)
         )
@@ -140,7 +141,7 @@ def _load_appservice(hostname, as_info, config_filename):
             if not isinstance(p, str):
                 raise KeyError("Bad value for 'protocols' item")
 
-    if as_info["url"] == None:
+    if as_info["url"] is None:
         logger.info(
             "(%s) Explicitly empty 'url' provided. This application service"
             " will not receive events or queries.",