]> git.bitcoin.ninja Git - youtube-dl/commitdiff
[downloader/http] Remove gruesome import
authorPhilipp Hagemeister <phihag@phihag.de>
Tue, 17 Feb 2015 20:42:31 +0000 (21:42 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Tue, 17 Feb 2015 20:42:31 +0000 (21:42 +0100)
youtube_dl/downloader/http.py

index 49170cf9d47634602efe7832b235e4a751e25817..25032ad4edcd5c8be6553a4c3778ea8c3c293682 100644 (file)
@@ -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