add exception handler in case preload breaks?
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>pull/37/head
parent
4ebdc9acc0
commit
20a3397e97
|
|
@ -3,3 +3,4 @@ import argparse
|
|||
def preload(parser: argparse.ArgumentParser):
|
||||
parser.add_argument("--lock-oo-submodule", action='store_true',
|
||||
help="(openOutpaint-webUI-extension) Prevent checking for main openOutpaint submodule updates.")
|
||||
|
||||
|
|
@ -49,11 +49,21 @@ def started(demo, app: FastAPI):
|
|||
pass
|
||||
|
||||
|
||||
def add_tab():
|
||||
if (not shared.cmd_opts.lock_oo_submodule):
|
||||
def update_app():
|
||||
git = os.environ.get('GIT', "git")
|
||||
run(f'"{git}" -C "' + scripts.basedir() +
|
||||
'" submodule update --init --recursive --remote')
|
||||
|
||||
|
||||
def add_tab():
|
||||
try:
|
||||
if shared.cmd_opts.lock_oo_submodule:
|
||||
print(f"[openOutpaint] Submodule locked. Will skip submodule update.")
|
||||
else:
|
||||
update_app()
|
||||
except Exception:
|
||||
update_app()
|
||||
|
||||
with gr.Blocks(analytics_enabled=False) as ui:
|
||||
#refresh = gr.Button(value="refresh", variant="primary")
|
||||
canvas = gr.HTML(
|
||||
|
|
|
|||
Loading…
Reference in New Issue