Address feedback

This commit is contained in:
GeorgianaElena
2019-08-22 15:06:08 +03:00
parent 8a61eb1738
commit 0058ed803d

View File

@@ -175,16 +175,14 @@ class SpawnHandler(BaseHandler):
done, pending = await asyncio.wait([f], timeout=1) done, pending = await asyncio.wait([f], timeout=1)
# If spawn_single_user throws an exception, raise a 500 error # If spawn_single_user throws an exception, raise a 500 error
# otherwise it may cause a redirect loop # otherwise it may cause a redirect loop
if f in done: if f.done() and f.exception():
future, = done exc = f.exception()
exc = future.exception()
if exc: if exc:
raise web.HTTPError( raise web.HTTPError(
500, 500,
"Error in Authenticator.pre_spawn_start: %s %s" "Error in Authenticator.pre_spawn_start: %s %s"
% (type(exc).__name__, str(exc)), % (type(exc).__name__, str(exc)),
) )
return
self.redirect(pending_url) self.redirect(pending_url)
@web.authenticated @web.authenticated