clean up config error logic and imports
1 files changed, 4 insertions, 5 deletions
diff --git a/synapse/config/registration.py b/synapse/config/registration.py
index 43ff20a637..4b9bf6f2d1 100644
--- a/synapse/config/registration.py
+++ b/synapse/config/registration.py
@@ -15,11 +15,10 @@
from distutils.util import strtobool
-from synapse.config._base import ConfigError
from synapse.types import RoomAlias
from synapse.util.stringutils import random_string_with_symbols
-from ._base import Config
+from ._base import Config, ConfigError
class RegistrationConfig(Config):
@@ -48,7 +47,7 @@ class RegistrationConfig(Config):
self.auto_join_rooms = config.get("auto_join_rooms", [])
for room_alias in self.auto_join_rooms:
if not RoomAlias.is_valid(room_alias):
- raise ConfigError('Invalid auto_join_rooms entry %s' % room_alias)
+ raise ConfigError('Invalid auto_join_rooms entry %s' % (room_alias,))
self.autocreate_auto_join_rooms = config.get("autocreate_auto_join_rooms", True)
def default_config(self, **kwargs):
@@ -106,10 +105,10 @@ class RegistrationConfig(Config):
# - "#example:example.com"
# Where auto_join_rooms are specified, setting this flag ensures that the
- # the rooms exists by creating them when the first user on the
+ # the rooms exist by creating them when the first user on the
# homeserver registers.
# Setting to false means that if the rooms are not manually created,
- # users cannot be auto joined since they do not exist.
+ # users cannot be auto-joined since they do not exist.
autocreate_auto_join_rooms: true
""" % locals()
|