print exception on TUI crash

This commit is contained in:
Lincoln Stein 2023-06-07 07:23:14 -04:00
parent 563bf70c95
commit 96038bd075

View File

@ -856,12 +856,14 @@ def select_and_download_models(opt: Namespace):
installApp = AddModelApplication(opt) installApp = AddModelApplication(opt)
try: try:
installApp.run() installApp.run()
except: except Exception as e:
form = installApp.main_form print(str(e))
if form.subprocess and form.subprocess.is_alive(): if hasattr(installApp,'main_form'):
logger.info('Terminating subprocesses') form = installApp.main_form
form.subprocess.terminate() if form.subprocess and form.subprocess.is_alive():
form.subprocess = None logger.info('Terminating subprocesses')
form.subprocess.terminate()
form.subprocess = None
process_and_execute(opt, installApp.user_selections) process_and_execute(opt, installApp.user_selections)
# ------------------------------------- # -------------------------------------