mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Fix checking for JupyterHub service being up
Would always fail before, since we never returned on success
This commit is contained in:
@@ -141,8 +141,9 @@ def ensure_jupyterhub_running(times=4):
|
||||
|
||||
for i in range(4):
|
||||
try:
|
||||
print('Waiting for JupyterHub to come up ({}/{} tries)'.format(i, times))
|
||||
print('Waiting for JupyterHub to come up ({}/{} tries)'.format(i + 1, times))
|
||||
urlopen('http://127.0.0.1')
|
||||
return
|
||||
except URLError as e:
|
||||
if isinstance(e.reason, ConnectionRefusedError):
|
||||
# Hub isn't up yet, sleep & loop
|
||||
|
||||
Reference in New Issue
Block a user