mirror of
https://mau.dev/maunium/synapse.git
synced 2024-07-08 04:02:16 +00:00
Get rid of try except
Signed-off-by: Aaron Raimist <aaron@raim.ist>
This commit is contained in:
parent
0b4f4cb0b4
commit
119c9c10b0
|
@ -38,15 +38,8 @@ class LogoutRestServlet(ClientV1RestServlet):
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def on_POST(self, request):
|
def on_POST(self, request):
|
||||||
try:
|
|
||||||
requester = yield self.auth.get_user_by_req(request)
|
requester = yield self.auth.get_user_by_req(request)
|
||||||
except AuthError as e:
|
|
||||||
# this implies the access token has already been deleted.
|
|
||||||
defer.returnValue((e.code, {
|
|
||||||
"errcode": e.errcode,
|
|
||||||
"error": e.msg
|
|
||||||
}))
|
|
||||||
else:
|
|
||||||
if requester.device_id is None:
|
if requester.device_id is None:
|
||||||
# the acccess token wasn't associated with a device.
|
# the acccess token wasn't associated with a device.
|
||||||
# Just delete the access token
|
# Just delete the access token
|
||||||
|
|
Loading…
Reference in New Issue
Block a user