From 77b0f69b0c07942ccad9ff18500ba1595862a513 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sat, 22 Apr 2017 11:14:53 -0700 Subject: [PATCH] Catch notification thread exception --- plexpy/notification_handler.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/plexpy/notification_handler.py b/plexpy/notification_handler.py index 3f8489ca..e23ea356 100644 --- a/plexpy/notification_handler.py +++ b/plexpy/notification_handler.py @@ -46,10 +46,14 @@ def process_queue(): if params is None: break elif params: - if 'notifier_id' in params: - notify(**params) - else: - add_notifier_each(**params) + try: + if 'notifier_id' in params: + notify(**params) + else: + add_notifier_each(**params) + except Exception as e: + logger.exception(u"PlexPy NotificationHandler :: Notification thread exception: %s" % e) + queue.task_done() logger.info(u"PlexPy NotificationHandler :: Notification thread exiting...")