diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2019-06-06 16:14:15 +0100 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2019-06-06 16:14:15 +0100 |
commit | 22e4dfa7f0acaf826beaccdcec74849bc49b1a9b (patch) | |
tree | 9ef2a8b8633418e547b94f35b314e859ec42f29a | |
parent | Fix typo and logic issue (diff) | |
download | synapse-22e4dfa7f0acaf826beaccdcec74849bc49b1a9b.tar.xz |
lint
-rw-r--r-- | synapse/handlers/auth.py | 5 | ||||
-rw-r--r-- | synapse/rest/client/v2_alpha/account.py | 10 |
2 files changed, 12 insertions, 3 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py index 69f924b3eb..7f8ddc99c6 100644 --- a/synapse/handlers/auth.py +++ b/synapse/handlers/auth.py @@ -469,7 +469,10 @@ class AuthHandler(BaseHandler): identity_handler = self.hs.get_handlers().identity_handler logger.info("Getting validated threepid. threepidcreds: %r", (threepid_creds,)) - if not password_servlet or self.hs.config.email_password_reset_behaviour == "remote": + if ( + not password_servlet + or self.hs.config.email_password_reset_behaviour == "remote" + ): threepid = yield identity_handler.threepid_from_creds(threepid_creds) elif self.hs.config.email_password_reset_behaviour == "local": row = yield self.store.get_threepid_validation_session( diff --git a/synapse/rest/client/v2_alpha/account.py b/synapse/rest/client/v2_alpha/account.py index 64aba95529..75822823c3 100644 --- a/synapse/rest/client/v2_alpha/account.py +++ b/synapse/rest/client/v2_alpha/account.py @@ -248,7 +248,10 @@ class PasswordResetSubmitTokenServlet(RestServlet): @defer.inlineCallbacks def on_GET(self, request, medium): if medium != "email": - raise SynapseError(400, "This medium is currently not supported for password resets") + raise SynapseError( + 400, + "This medium is currently not supported for password resets", + ) sid = parse_string(request, "sid") client_secret = parse_string(request, "client_secret") @@ -315,7 +318,10 @@ class PasswordResetSubmitTokenServlet(RestServlet): @defer.inlineCallbacks def on_POST(self, request, medium): if medium != "email": - raise SynapseError(400, "This medium is currently not supported for password resets") + raise SynapseError( + 400, + "This medium is currently not supported for password resets", + ) body = parse_json_object_from_request(request) assert_params_in_dict(body, [ |