From a09b6a4562cf6a12bcb064da080e1801d098693e Mon Sep 17 00:00:00 2001 From: croneter Date: Thu, 7 Dec 2017 18:22:52 +0100 Subject: [PATCH] Fix SSLError not being recognized as such ConnectionError is ancestor of SSLError --- resources/lib/downloadutils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/lib/downloadutils.py b/resources/lib/downloadutils.py index 53eb8d84..7178a09d 100644 --- a/resources/lib/downloadutils.py +++ b/resources/lib/downloadutils.py @@ -196,6 +196,10 @@ class DownloadUtils(): r = self._doDownload(s, action_type, **kwargs) # THE EXCEPTIONS + except requests.exceptions.SSLError as e: + log.warn("Invalid SSL certificate for: %s" % url) + log.warn(e) + except requests.exceptions.ConnectionError as e: # Connection error log.warn("Server unreachable at: %s" % url) @@ -209,10 +213,6 @@ class DownloadUtils(): log.warn('HTTP Error at %s' % url) log.warn(e) - except requests.exceptions.SSLError as e: - log.warn("Invalid SSL certificate for: %s" % url) - log.warn(e) - except requests.exceptions.TooManyRedirects as e: log.warn("Too many redirects connecting to: %s" % url) log.warn(e)