summaryrefslogtreecommitdiff
path: root/youtube_dl/downloader/http.py
diff options
context:
space:
mode:
Diffstat (limited to 'youtube_dl/downloader/http.py')
-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