|
|
@ -1,11 +1,10 @@
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import errno
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
|
|
|
|
import socket
|
|
|
|
import time
|
|
|
|
import time
|
|
|
|
|
|
|
|
|
|
|
|
from socket import error as SocketError
|
|
|
|
|
|
|
|
import errno
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from .common import FileDownloader
|
|
|
|
from .common import FileDownloader
|
|
|
|
from ..compat import (
|
|
|
|
from ..compat import (
|
|
|
|
compat_urllib_request,
|
|
|
|
compat_urllib_request,
|
|
|
@ -102,7 +101,7 @@ class HttpFD(FileDownloader):
|
|
|
|
resume_len = 0
|
|
|
|
resume_len = 0
|
|
|
|
open_mode = 'wb'
|
|
|
|
open_mode = 'wb'
|
|
|
|
break
|
|
|
|
break
|
|
|
|
except SocketError as e:
|
|
|
|
except socket.error as e:
|
|
|
|
if e.errno != errno.ECONNRESET:
|
|
|
|
if e.errno != errno.ECONNRESET:
|
|
|
|
# Connection reset is no problem, just retry
|
|
|
|
# Connection reset is no problem, just retry
|
|
|
|
raise
|
|
|
|
raise
|
|
|
|