summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2020-09-22 07:01:59 +0700
committerSergey M․ <dstftw@gmail.com>2020-09-22 07:01:59 +0700
commitc5764b3f89b66e0148a186490f522ae7c259a55e (patch)
tree2361b5606f69beea58a37f90889661ef7c62b3fe
parent0837992a226690d514eb01b7460bed4a33fddb30 (diff)
downloadyoutube-dl-c5764b3f89b66e0148a186490f522ae7c259a55e.tar.gz
youtube-dl-c5764b3f89b66e0148a186490f522ae7c259a55e.tar.bz2
youtube-dl-c5764b3f89b66e0148a186490f522ae7c259a55e.tar.xz
youtube-dl-c5764b3f89b66e0148a186490f522ae7c259a55e.zip
[downloader/http] Properly handle missing message in SSLError (closes #26646)
-rw-r--r--youtube_dl/downloader/http.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/downloader/http.py b/youtube_dl/downloader/http.py
index 04da14d91..96379caf1 100644
--- a/youtube_dl/downloader/http.py
+++ b/youtube_dl/downloader/http.py
@@ -241,7 +241,7 @@ class HttpFD(FileDownloader):
except socket.error as e:
# SSLError on python 2 (inherits socket.error) may have
# no errno set but this error message
- if e.errno in (errno.ECONNRESET, errno.ETIMEDOUT) or getattr(e, 'message') == 'The read operation timed out':
+ if e.errno in (errno.ECONNRESET, errno.ETIMEDOUT) or getattr(e, 'message', None) == 'The read operation timed out':
retry(e)
raise