Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[downloader/http] Properly handle missing message in SSLError (closes…
… #26646)
  • Loading branch information
Sergey M․ committed Sep 22, 2020
1 parent 0837992 commit c5764b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion youtube_dl/downloader/http.py
Expand Up @@ -241,7 +241,7 @@ def retry(e):
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

Expand Down

0 comments on commit c5764b3

Please sign in to comment.