From 43448cc68d4d530015b112619be785f6529b0e06 Mon Sep 17 00:00:00 2001 From: DLmaster Date: Tue, 28 Jan 2025 10:22:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(timer):=20=E4=BF=AE=E5=A4=8D=E5=8F=8D?= =?UTF-8?q?=E5=A4=8D=E8=AE=B0=E5=BD=95FailSafeException=E5=BD=B1=E5=93=8Dl?= =?UTF-8?q?og=E9=98=85=E8=AF=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/core/timer.py | 6 +++++- resources/notice.json | 4 ---- 2 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 resources/notice.json diff --git a/app/core/timer.py b/app/core/timer.py index 11b9008..efd46f7 100644 --- a/app/core/timer.py +++ b/app/core/timer.py @@ -45,6 +45,8 @@ class MainTimer(QWidget): ): super().__init__(parent) + self.if_FailSafeException = False + self.Timer = QTimer() self.Timer.timeout.connect(self.timed_start) self.Timer.timeout.connect(self.set_silence) @@ -100,7 +102,9 @@ class MainTimer(QWidget): ] ) except pyautogui.FailSafeException as e: - logger.warning(f"FailSafeException: {e}") + if not self.if_FailSafeException: + logger.warning(f"FailSafeException: {e}") + self.if_FailSafeException = True def search_queue(self) -> list: """搜索所有调度队列实例""" diff --git a/resources/notice.json b/resources/notice.json deleted file mode 100644 index 92f2fb1..0000000 --- a/resources/notice.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "content": "", - "time": "2000-01-01 00:00" -} \ No newline at end of file