summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2019-08-01 12:11:27 +0200
committerBrendan Abolivier <babolivier@matrix.org>2019-08-01 12:19:08 +0200
commitf25f638c35b1d16eb0aa3f746c10313b3c3b040d (patch)
tree2c4448fb6df162ee58e40f355d817de7737992ea /synapse/config
parentSample config (diff)
downloadsynapse-f25f638c35b1d16eb0aa3f746c10313b3c3b040d.tar.xz
Lint
Diffstat (limited to 'synapse/config')
-rw-r--r--synapse/config/registration.py19
1 files changed, 7 insertions, 12 deletions
diff --git a/synapse/config/registration.py b/synapse/config/registration.py
index 624fd546dd..e2bee3c116 100644
--- a/synapse/config/registration.py
+++ b/synapse/config/registration.py
@@ -14,10 +14,10 @@
 # limitations under the License.
 
 import os
-import pkg_resources
-
 from distutils.util import strtobool
 
+import pkg_resources
+
 from synapse.config._base import Config, ConfigError
 from synapse.types import RoomAlias
 from synapse.util.stringutils import random_string_with_symbols
@@ -54,13 +54,10 @@ class AccountValidityConfig(Config):
             template_dir = pkg_resources.resource_filename("synapse", "res/templates")
 
         if "account_renewed_html_path" in config:
-            file_path = os.path.join(
-                template_dir, config["account_renewed_html_path"],
-            )
+            file_path = os.path.join(template_dir, config["account_renewed_html_path"])
 
             self.account_renewed_html_content = self.read_file(
-                file_path,
-                "account_validity.account_renewed_html_path",
+                file_path, "account_validity.account_renewed_html_path"
             )
         else:
             self.account_renewed_html_content = (
@@ -68,12 +65,10 @@ class AccountValidityConfig(Config):
             )
 
         if "invalid_token_html_path" in config:
-            file_path = os.path.join(
-                template_dir, config["invalid_token_html_path"],
-            )
+            file_path = os.path.join(template_dir, config["invalid_token_html_path"])
 
             self.invalid_token_html_content = self.read_file(
-                file_path, "account_validity.invalid_token_html_path",
+                file_path, "account_validity.invalid_token_html_path"
             )
         else:
             self.invalid_token_html_content = (
@@ -184,7 +179,7 @@ class RegistrationConfig(Config):
         #  # Directory in which Synapse will try to find the HTML files to serve to the
         #  # user when trying to renew an account. Optional, defaults to
         #  # synapse/res/templates.
-        #  template_dir: "res/templates" 
+        #  template_dir: "res/templates"
         #  # HTML to be displayed to the user after they successfully renewed their
         #  # account. Optional.
         #  account_renewed_html_path: "account_renewed.html"