1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-26 10:24:33 +01: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 committed by tsia
parent 07974b90b2
commit dd7c84f5d3

View 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