X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fsocks.py;h=0f5d7bdb2128b17c2e1dba3144ff01d9b3d2f06a;hb=71cdd75628f851975eef551a96b1a24f94066d74;hp=fece280626606453f378d44a533bb167e656a30f;hpb=83442966194640d9bc00e7f3086aa5e8b25c4ae3;p=youtube-dl diff --git a/youtube_dl/socks.py b/youtube_dl/socks.py index fece28062..0f5d7bdb2 100644 --- a/youtube_dl/socks.py +++ b/youtube_dl/socks.py @@ -55,7 +55,7 @@ class Socks5AddressType(object): ATYP_IPV6 = 0x04 -class ProxyError(IOError): +class ProxyError(socket.error): ERR_SUCCESS = 0x00 def __init__(self, code=None, msg=None): @@ -123,7 +123,7 @@ class sockssocket(socket.socket): while len(data) < cnt: cur = self.recv(cnt - len(data)) if not cur: - raise IOError('{0} bytes missing'.format(cnt - len(data))) + raise EOFError('{0} bytes missing'.format(cnt - len(data))) data += cur return data