From fbf4a524c1720f2b242b21cd7b12cc2338816686 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Fri, 25 Mar 2016 15:39:31 -0700 Subject: [PATCH] Catch URLError when uploading to Imgur --- plexpy/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plexpy/helpers.py b/plexpy/helpers.py index 30ebc7c6..ab3e9b29 100644 --- a/plexpy/helpers.py +++ b/plexpy/helpers.py @@ -559,7 +559,7 @@ def uploadToImgur(imgPath, imgTitle=''): logger.warn(u"PlexPy Helpers :: Unable to upload image to Imgur: %s" % response.reason) else: logger.warn(u"PlexPy Helpers :: Unable to upload image to Imgur.") - except urllib2.HTTPError as e: + except (urllib2.HTTPError, urllib2.URLError) as e: logger.warn(u"PlexPy Helpers :: Unable to upload image to Imgur: %s" % e) return img_url \ No newline at end of file