summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/notifier.py4
-rw-r--r--client/tts.py5
2 files changed, 5 insertions, 4 deletions
diff --git a/client/notifier.py b/client/notifier.py
index b081a66..941ae6b 100644
--- a/client/notifier.py
+++ b/client/notifier.py
@@ -1,5 +1,6 @@
# -*- coding: utf-8-*-
import Queue
+import atexit
from modules import Gmail
from apscheduler.scheduler import Scheduler
import logging
@@ -29,9 +30,10 @@ class Notifier(object):
self._logger.warning('gmail_address or gmail_password not set ' +
'in profile, Gmail notifier will not be used')
- sched = Scheduler()
+ sched = Scheduler(daemon=True)
sched.start()
sched.add_interval_job(self.gather, seconds=30)
+ atexit.register(lambda: sched.shutdown(wait=False))
def gather(self):
[client.run() for client in self.notifiers]
diff --git a/client/tts.py b/client/tts.py
index 9a9cf8b..88625ad 100644
--- a/client/tts.py
+++ b/client/tts.py
@@ -511,9 +511,8 @@ def get_engine_by_slug(slug=None):
"This is most certainly a bug." % slug)
engine = selected_engines[0]
if not engine.is_available():
- raise ValueError("TTS engine '%s' is not available (due to " +
- "missing dependencies, missing " +
- "dependencies, etc.)" % slug)
+ raise ValueError(("TTS engine '%s' is not available (due to " +
+ "missing dependencies, etc.)") % slug)
return engine