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