From 29d9dd2a71661dfedf21695b7796cbd51e03c5aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Thu, 8 Aug 2024 22:44:07 +0800 Subject: [PATCH] fix --- LunaTranslator/LunaTranslator/gui/translatorUI.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/LunaTranslator/LunaTranslator/gui/translatorUI.py b/LunaTranslator/LunaTranslator/gui/translatorUI.py index 3edc7065..f8695a6c 100644 --- a/LunaTranslator/LunaTranslator/gui/translatorUI.py +++ b/LunaTranslator/LunaTranslator/gui/translatorUI.py @@ -1239,16 +1239,12 @@ class QUnFrameWindow(resizableframeless): gobject.baseobject.textsource = None endsubprocs() - try: + gobject.baseobject.destroytray() + handle = windows.CreateMutex(False, "LUNASAVECONFIGUPDATE") + if windows.GetLastError() != windows.ERROR_ALREADY_EXISTS: saveallconfig() self.tryremoveuseless() - except: - print_exc() - gobject.baseobject.destroytray() - handle = windows.CreateMutex(False, "LUNASAVECONFIG") - if windows.GetLastError() != windows.ERROR_ALREADY_EXISTS: doupdate() - else: windows.CloseHandle(handle) os._exit(0)