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.
This commit is contained in:
David Baker 2017-03-01 18:08:51 +00:00
parent 3557cf34dc
commit ad882cd54d

View File

@ -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, _):