From 16e7711e22648027739096560914a976b8eea786 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Tue, 17 Feb 2015 21:42:31 +0100 Subject: [PATCH] [downloader/http] Remove gruesome import --- youtube_dl/downloader/http.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 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,10 +1,9 @@ from __future__ import unicode_literals -import os -import time - -from socket import error as SocketError import errno +import os +import socket +import time from .common import FileDownloader from ..compat import ( @@ -102,7 +101,7 @@ def real_download(self, filename, info_dict): 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