From 0363979c6c9771dcede53df5109c25fe5cc348d6 Mon Sep 17 00:00:00 2001 From: Bastian Schroll Date: Wed, 3 Feb 2021 10:43:12 +0100 Subject: [PATCH] Update timer.py --- boswatch/timer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/boswatch/timer.py b/boswatch/timer.py index 11bb03f..5c4e8dd 100644 --- a/boswatch/timer.py +++ b/boswatch/timer.py @@ -64,7 +64,8 @@ class RepeatedTimer: if self._thread is not None: logging.debug("stop repeatedTimer: %s", self._thread.name) self._event.set() - self._thread.join() + if self._thread is not None: + self._thread.join() return True logging.warning("repeatedTimer always stopped") return True