Fix SSLError not being recognized as such

ConnectionError is ancestor of SSLError
This commit is contained in:
croneter 2017-12-07 18:22:52 +01:00
parent 18a5bcd7db
commit a09b6a4562

View file

@ -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)