diff --git a/install.py b/install.py index ee5b272..1bbade6 100644 --- a/install.py +++ b/install.py @@ -18,4 +18,8 @@ if not os.path.isfile(os.path.join(installDir, "app", "index.html")): print(stdout) except ImportError: print("[openoutpaint-extension] We failed to import the 'launch' module. Using 'os'") - os.system(command) + try: + os.system(command) + except: + # TODO: find exception type + print(f"[openOutpaint-extension-submodule] failed to download update, check network") diff --git a/scripts/main.py b/scripts/main.py index 7ed2d38..f5b1e02 100644 --- a/scripts/main.py +++ b/scripts/main.py @@ -50,10 +50,14 @@ def started(demo, app: FastAPI): def update_app(): - git = os.environ.get('GIT', "git") - # print(scripts.basedir) - run(f'"{git}" -C "' + os.path.join(scripts.basedir(), usefulDirs[0], usefulDirs[1]) + - '" submodule update --init --recursive --remote', live=True) + try: + git = os.environ.get('GIT', "git") + # print(scripts.basedir) + run(f'"{git}" -C "' + os.path.join(scripts.basedir(), usefulDirs[0], usefulDirs[1]) + + '" submodule update --init --recursive --remote', live=True) + except: + # TODO: find exception type + print(f"[openOutpaint-extension-submodule] failed to download update, check network") def add_tab():