Fix checking for JupyterHub service being up

Would always fail before, since we never returned on
success
This commit is contained in:
yuvipanda
2018-07-11 13:01:57 -07:00
parent 54ebfbce23
commit 6e6ecdb26b

View File

@@ -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