diff --git a/app/core/timer.py b/app/core/timer.py index efd46f7..1536710 100644 --- a/app/core/timer.py +++ b/app/core/timer.py @@ -39,14 +39,14 @@ from app.services import System class MainTimer(QWidget): + if_FailSafeExceptioned = False + def __init__( self, parent=None, ): super().__init__(parent) - self.if_FailSafeException = False - self.Timer = QTimer() self.Timer.timeout.connect(self.timed_start) self.Timer.timeout.connect(self.set_silence) @@ -102,9 +102,9 @@ class MainTimer(QWidget): ] ) except pyautogui.FailSafeException as e: - if not self.if_FailSafeException: + if not self.if_FailSafeExceptioned: logger.warning(f"FailSafeException: {e}") - self.if_FailSafeException = True + self.if_FailSafeExceptioned = True def search_queue(self) -> list: """搜索所有调度队列实例"""