]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[downloader/http] Properly handle missing message in SSLError (closes #26646)
authorSergey M․ <dstftw@gmail.com>
Tue, 22 Sep 2020 00:01:59 +0000 (07:01 +0700)
committerSergey M․ <dstftw@gmail.com>
Tue, 22 Sep 2020 00:01:59 +0000 (07:01 +0700)
youtube_dl/downloader/http.py

index 04da14d91cff55b2708366662dabeb1c827515af..96379caf1ec2f462c7aadfaa02589778ba07e548 100644 (file)
@@ -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