diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2019-04-04 16:01:04 +0100 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2019-04-04 16:01:04 +0100 |
commit | 595d6ecd863c7b929000f4497c3ebb36a7c90143 (patch) | |
tree | 5968237fa312cf27e787ef4d2c13ed1ad8e406dd | |
parent | lint (diff) | |
download | synapse-595d6ecd863c7b929000f4497c3ebb36a7c90143.tar.xz |
fix domain_whitelist
-rw-r--r-- | synapse/config/server.py | 8 |
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] != '/': |