1
0
mirror of https://github.com/l1ving/youtube-dl synced 2024-11-20 19:32:50 +08:00

[downloader/http] Properly handle missing message in SSLError (closes #26646)

This commit is contained in:
Sergey M․ 2020-09-22 07:01:59 +07:00
parent 0837992a22
commit c5764b3f89
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D

View File

@ -241,7 +241,7 @@ class HttpFD(FileDownloader):
except socket.error as e: except socket.error as e:
# SSLError on python 2 (inherits socket.error) may have # SSLError on python 2 (inherits socket.error) may have
# no errno set but this error message # 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) retry(e)
raise raise