summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2019-04-04 16:01:04 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2019-04-04 16:01:04 +0100
commit595d6ecd863c7b929000f4497c3ebb36a7c90143 (patch)
tree5968237fa312cf27e787ef4d2c13ed1ad8e406dd
parentlint (diff)
downloadsynapse-595d6ecd863c7b929000f4497c3ebb36a7c90143.tar.xz
fix domain_whitelist
-rw-r--r--synapse/config/server.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py
index 13627fc8bf..09f05173d9 100644
--- a/synapse/config/server.py
+++ b/synapse/config/server.py
@@ -116,12 +116,12 @@ class ServerConfig(Config):
         )
 
         self.federation_domain_whitelist = None
-        if len(federation_domain_whitelist) > 0:
+        if federation_domain_whitelist is not None:
+            # turn the whitelist into a hash for speed of lookup
             self.federation_domain_whitelist = {}
 
-        # turn the whitelist into a hash for speed of lookup
-        for domain in federation_domain_whitelist:
-            self.federation_domain_whitelist[domain] = True
+            for domain in federation_domain_whitelist:
+                self.federation_domain_whitelist[domain] = True
 
         if self.public_baseurl is not None:
             if self.public_baseurl[-1] != '/':