mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-17 15:03:02 +00:00
Address feedback
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user