From: Philipp Hagemeister Date: Tue, 17 Feb 2015 20:42:31 +0000 (+0100) Subject: [downloader/http] Remove gruesome import X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=16e7711e22648027739096560914a976b8eea786;p=youtube-dl [downloader/http] Remove gruesome import --- 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