From ad882cd54d8349750f363e6127eca14a2e52b2b6 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 1 Mar 2017 18:08:51 +0000 Subject: [PATCH] Just return the deferred straight off defer.returnValue doth not maketh a generator: it would need a yield to be a generator, and this doesn't need a yield. --- synapse/handlers/auth.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py index 448bc0b31f..2ea1d17ca5 100644 --- a/synapse/handlers/auth.py +++ b/synapse/handlers/auth.py @@ -309,13 +309,11 @@ class AuthHandler(BaseHandler): defer.returnValue(True) raise LoginError(401, "", errcode=Codes.UNAUTHORIZED) - @defer.inlineCallbacks def _check_email_identity(self, authdict, _): - defer.returnValue(self._check_threepid('email', authdict)) + return self._check_threepid('email', authdict) - @defer.inlineCallbacks def _check_msisdn(self, authdict, _): - defer.returnValue(self._check_threepid('msisdn', authdict)) + return self._check_threepid('msisdn', authdict) @defer.inlineCallbacks def _check_dummy_auth(self, authdict, _):