diff --git a/core/util/ThreadManager.py b/core/util/ThreadManager.py index 0a96aa42..9334136c 100644 --- a/core/util/ThreadManager.py +++ b/core/util/ThreadManager.py @@ -107,15 +107,15 @@ def doLater(self, interval: float, func: Callable, args: list = None, kwargs: di def onTimerEnd(self, timer: ThreadTimer): - if not timer or not timer.callback: - return - - timer.callback(*timer.args, **timer.kwargs) - self.removeTimer(timer) - + try: + timer.callback(*timer.args, **timer.kwargs) + self.removeTimer(timer) + except: + # timer has no callback + pass def removeTimer(self, timer: ThreadTimer): - if not timer or not timer.callback: + if not timer: return if timer.timer.is_alive():