[teamfourstar] Simplify _VALID_URL and relax regexes
[youtube-dl] / youtube_dl / socks.py
index a5b27fea7c685208b1315110de90139d4bd6d075..63d19b3a5214221afa71a6d43bde36a39c13cd4b 100644 (file)
@@ -76,7 +76,7 @@ class Socks4Error(ProxyError):
 
     CODES = {
         91: 'request rejected or failed',
-        92: 'request rejected becasue SOCKS server cannot connect to identd on the client',
+        92: 'request rejected because SOCKS server cannot connect to identd on the client',
         93: 'request rejected because the client program and identd report different user-ids'
     }
 
@@ -103,6 +103,7 @@ class ProxyType(object):
     SOCKS4A = 1
     SOCKS5 = 2
 
+
 Proxy = collections.namedtuple('Proxy', (
     'type', 'host', 'port', 'username', 'password', 'remote_dns'))
 
@@ -210,8 +211,6 @@ class sockssocket(socket.socket):
             if status != SOCKS5_USER_AUTH_SUCCESS:
                 self.close()
                 raise Socks5Error(Socks5Error.ERR_GENERAL_FAILURE)
-        elif method == Socks5Auth.AUTH_NONE:
-            pass
 
     def _setup_socks5(self, address):
         destaddr, port = address