From d8c897db5cc0261ff337a93f1f7a7298f246f76a Mon Sep 17 00:00:00 2001 From: petrucci4prez Date: Sat, 24 Jun 2017 00:47:54 -0400 Subject: [PATCH] fix soundLib thread cleanup when no threads started --- soundLib.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/soundLib.py b/soundLib.py index eed3f24..b467228 100644 --- a/soundLib.py +++ b/soundLib.py @@ -226,8 +226,11 @@ class SoundLib: def _stopMonitor(self): self._stopper.set() self._ttsQueue.put_nowait(self._sentinel) - self._thread.join() - self._thread = None + try: + self._thread.join() + self._thread = None + except AttributeError: + pass logger.debug('Stopping TTS Queue Monitor') def __del__(self):