hey guess who had an internet outage and realized openOutpaint extension doesn't work when that occurs

main
zero01101 2023-07-29 10:26:51 -05:00
parent 128508fa06
commit 2cb6f698e9
2 changed files with 13 additions and 5 deletions

View File

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

View File

@ -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():