mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-17 23:13:00 +00:00
Merge pull request #150 from minrk/running-fix
check user.running in delete handler
This commit is contained in:
@@ -109,7 +109,7 @@ class UserAPIHandler(BaseUserHandler):
|
|||||||
raise web.HTTPError(400, "Cannot delete yourself!")
|
raise web.HTTPError(400, "Cannot delete yourself!")
|
||||||
if user.stop_pending:
|
if user.stop_pending:
|
||||||
raise web.HTTPError(400, "%s's server is in the process of stopping, please wait." % name)
|
raise web.HTTPError(400, "%s's server is in the process of stopping, please wait." % name)
|
||||||
if user.spawner is not None:
|
if user.running:
|
||||||
yield self.stop_single_user(user)
|
yield self.stop_single_user(user)
|
||||||
if user.stop_pending:
|
if user.stop_pending:
|
||||||
raise web.HTTPError(400, "%s's server is in the process of stopping, please wait." % name)
|
raise web.HTTPError(400, "%s's server is in the process of stopping, please wait." % name)
|
||||||
|
Reference in New Issue
Block a user