aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--youtube_dl/socks.py4
1 files changed, 2 insertions, 2 deletions
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