diff --git a/tljh/installer.py b/tljh/installer.py index 4dd94fd..0ceb417 100644 --- a/tljh/installer.py +++ b/tljh/installer.py @@ -2,6 +2,7 @@ import sys import os import tljh.systemd as systemd import tljh.conda as conda +from urllib.error import HTTPError from urllib.request import urlopen, URLError from tljh import user import secrets @@ -151,6 +152,13 @@ def ensure_jupyterhub_running(times=4): continue # Everything else should immediately abort raise + except HTTPError as h: + if h.code == 404: + # May be transient + time.sleep(1) + continue + # Everything else should immediately abort + raise raise Exception("Installation failed: JupyterHub did not start in {}s".format(times))