mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-11 15:56:07 -07:00
Raise exception type
This commit is contained in:
parent
4ad421d4d0
commit
86215c34be
2 changed files with 3 additions and 3 deletions
|
@ -642,7 +642,7 @@ def build_notify_text(session=None, timeline=None, notify_action=None, agent_id=
|
||||||
with open(poster_file, 'wb') as f:
|
with open(poster_file, 'wb') as f:
|
||||||
f.write(result[0])
|
f.write(result[0])
|
||||||
else:
|
else:
|
||||||
raise Exception(u'PMS request failed')
|
raise Exception(u'PMS image request failed')
|
||||||
|
|
||||||
# Upload thumb to Imgur and get link
|
# Upload thumb to Imgur and get link
|
||||||
poster_url = helpers.uploadToImgur(poster_file, poster_title)
|
poster_url = helpers.uploadToImgur(poster_file, poster_title)
|
||||||
|
|
|
@ -2856,7 +2856,7 @@ class WebInterface(object):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if 'indexes' in img:
|
if 'indexes' in img:
|
||||||
raise
|
raise NotFound
|
||||||
return serve_file(path=ffp, content_type='image/jpeg')
|
return serve_file(path=ffp, content_type='image/jpeg')
|
||||||
|
|
||||||
except NotFound:
|
except NotFound:
|
||||||
|
@ -2873,7 +2873,7 @@ class WebInterface(object):
|
||||||
|
|
||||||
return result[0]
|
return result[0]
|
||||||
else:
|
else:
|
||||||
raise
|
raise Exception(u'PMS image request failed')
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.exception(u'Failed to get image %s, falling back to %s.' % (img, fallback))
|
logger.exception(u'Failed to get image %s, falling back to %s.' % (img, fallback))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue