From 739d3500feef8a4cb84a60839bba486001691697 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Tue, 13 Mar 2018 01:50:32 +0000 Subject: [PATCH] pep8 --- synapse/config/registration.py | 4 +++- synapse/handlers/register.py | 4 +++- synapse/util/threepids.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/synapse/config/registration.py b/synapse/config/registration.py index 14ef535b2..6cd830a78 100644 --- a/synapse/config/registration.py +++ b/synapse/config/registration.py @@ -33,7 +33,9 @@ class RegistrationConfig(Config): self.registrations_require_3pid = config.get("registrations_require_3pid", []) self.allowed_local_3pids = config.get("allowed_local_3pids", []) - self.check_is_for_allowed_local_3pids = config.get("check_is_for_allowed_local_3pids", False) + self.check_is_for_allowed_local_3pids = config.get( + "check_is_for_allowed_local_3pids", False + ) self.registration_shared_secret = config.get("registration_shared_secret") self.bcrypt_rounds = config.get("bcrypt_rounds", 12) diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py index 87d0a4580..96f480f83 100644 --- a/synapse/handlers/register.py +++ b/synapse/handlers/register.py @@ -308,7 +308,9 @@ class RegistrationHandler(BaseHandler): logger.info("got threepid with medium '%s' and address '%s'", threepid['medium'], threepid['address']) - if not (yield check_3pid_allowed(self.hs, threepid['medium'], threepid['address'])): + if not ( + yield check_3pid_allowed(self.hs, threepid['medium'], threepid['address']) + ): raise RegistrationError( 403, "Third party identifier is not allowed" ) diff --git a/synapse/util/threepids.py b/synapse/util/threepids.py index d2f646db9..e1cf5dbb1 100644 --- a/synapse/util/threepids.py +++ b/synapse/util/threepids.py @@ -40,7 +40,7 @@ def check_3pid_allowed(hs, medium, address): hs.config.check_is_for_allowed_local_3pids, "/_matrix/identity/api/v1/discover_urls" ), - {'medium': medium, 'address': address } + {'medium': medium, 'address': address} ) defer.returnValue(data['hs_url'] + "/" == hs.config.public_baseurl) return