From 2b9717535b56011c25c750b51429f1dc80a3533a Mon Sep 17 00:00:00 2001 From: misyaguziya Date: Sun, 14 Apr 2024 14:38:59 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B[bugfix]=20Model=20:=20update?= =?UTF-8?q?=E3=81=AE=E5=87=A6=E7=90=86=E3=82=92threadFnc=E3=81=8B=E3=82=89?= =?UTF-8?q?Thread=E3=81=AE=E5=87=A6=E7=90=86=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model.py b/model.py index 6b97a918..01e51bd7 100644 --- a/model.py +++ b/model.py @@ -293,12 +293,12 @@ class Model: copyfile(os_path.join(current_directory, folder_name, "batch", batch_name), os_path.join(current_directory, batch_name)) command = [os_path.join(current_directory, batch_name), program_name, folder_name, tmp_directory_name, str(restart)] Popen(command, cwd=current_directory) - except Exception as e: + except Exception: import traceback with open('error.log', 'a') as f: traceback.print_exc(file=f) webbrowser.open(config.BOOTH_URL, new=2, autoraise=True) - th_update_software = threadFnc(updateSoftwareTask) + th_update_software = Thread(target=updateSoftwareTask) th_update_software.daemon = True th_update_software.start()