From 86215c34be76340f846e0689e2f5a422ff5dcff6 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Thu, 12 May 2016 00:26:07 -0700 Subject: [PATCH] Raise exception type --- plexpy/notification_handler.py | 2 +- plexpy/webserve.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plexpy/notification_handler.py b/plexpy/notification_handler.py index d2898578..3cbb9783 100644 --- a/plexpy/notification_handler.py +++ b/plexpy/notification_handler.py @@ -642,7 +642,7 @@ def build_notify_text(session=None, timeline=None, notify_action=None, agent_id= with open(poster_file, 'wb') as f: f.write(result[0]) else: - raise Exception(u'PMS request failed') + raise Exception(u'PMS image request failed') # Upload thumb to Imgur and get link poster_url = helpers.uploadToImgur(poster_file, poster_title) diff --git a/plexpy/webserve.py b/plexpy/webserve.py index a4a92aa2..e3fbc544 100644 --- a/plexpy/webserve.py +++ b/plexpy/webserve.py @@ -2856,7 +2856,7 @@ class WebInterface(object): try: if 'indexes' in img: - raise + raise NotFound return serve_file(path=ffp, content_type='image/jpeg') except NotFound: @@ -2873,7 +2873,7 @@ class WebInterface(object): return result[0] else: - raise + raise Exception(u'PMS image request failed') except Exception as e: logger.exception(u'Failed to get image %s, falling back to %s.' % (img, fallback))