projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[downloader/http] Remove gruesome import
[youtube-dl]
/
youtube_dl
/
downloader
/
http.py
diff --git
a/youtube_dl/downloader/http.py
b/youtube_dl/downloader/http.py
index 8a1d578d54c6422df3b5ea768bb5a7547d52d32d..25032ad4edcd5c8be6553a4c3778ea8c3c293682 100644
(file)
--- a/
youtube_dl/downloader/http.py
+++ b/
youtube_dl/downloader/http.py
@@
-1,6
+1,8
@@
from __future__ import unicode_literals
from __future__ import unicode_literals
+import errno
import os
import os
+import socket
import time
from .common import FileDownloader
import time
from .common import FileDownloader
@@
-99,6
+101,11
@@
class HttpFD(FileDownloader):
resume_len = 0
open_mode = 'wb'
break
resume_len = 0
open_mode = 'wb'
break
+ except socket.error as e:
+ if e.errno != errno.ECONNRESET:
+ # Connection reset is no problem, just retry
+ raise
+
# Retry
count += 1
if count <= retries:
# Retry
count += 1
if count <= retries: