aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/downloader/http.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2015-02-17 21:42:31 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2015-02-17 21:42:31 +0100
commit16e7711e22648027739096560914a976b8eea786 (patch)
tree3def49b4f024e73663728c1a5075e6ae96d4de07 /youtube_dl/downloader/http.py
parent98f000409f072e544d6c3b07809022f703b8b23d (diff)
[downloader/http] Remove gruesome import
Diffstat (limited to 'youtube_dl/downloader/http.py')
-rw-r--r--youtube_dl/downloader/http.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/youtube_dl/downloader/http.py b/youtube_dl/downloader/http.py
index 49170cf9d..25032ad4e 100644
--- a/youtube_dl/downloader/http.py
+++ b/youtube_dl/downloader/http.py
@@ -1,11 +1,10 @@
from __future__ import unicode_literals
+import errno
import os
+import socket
import time
-from socket import error as SocketError
-import errno
-
from .common import FileDownloader
from ..compat import (
compat_urllib_request,
@@ -102,7 +101,7 @@ class HttpFD(FileDownloader):
resume_len = 0
open_mode = 'wb'
break
- except SocketError as e:
+ except socket.error as e:
if e.errno != errno.ECONNRESET:
# Connection reset is no problem, just retry
raise