diff options
author | Daniele Tricoli <eriol@mornie.org> | 2015-10-09 23:19:30 +0200 |
---|---|---|
committer | Daniele Tricoli <eriol@mornie.org> | 2015-10-09 23:19:30 +0200 |
commit | cd2a4010a9e1356c36cfb42b57501343c29e2608 (patch) | |
tree | 81af3946a53bb27e34e85eb28035ace8c3e7b27e /urllib3/util/connection.py | |
parent | ebc01af6ebb87c1e27e50b4ea572b8c1a20e70b0 (diff) | |
parent | 7db0aa9b18e70f43ef0bfcdec7f223e5b681aaf0 (diff) | |
download | python-urllib3-cd2a4010a9e1356c36cfb42b57501343c29e2608.tar python-urllib3-cd2a4010a9e1356c36cfb42b57501343c29e2608.tar.gz |
merge patched into master
Diffstat (limited to 'urllib3/util/connection.py')
-rw-r--r-- | urllib3/util/connection.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/urllib3/util/connection.py b/urllib3/util/connection.py index 9ed5a64..4f2f0f1 100644 --- a/urllib3/util/connection.py +++ b/urllib3/util/connection.py @@ -80,16 +80,16 @@ def create_connection(address, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, sock.connect(sa) return sock - except socket.error as _: - err = _ + except socket.error as e: + err = e if sock is not None: sock.close() sock = None if err is not None: raise err - else: - raise socket.error("getaddrinfo returns an empty list") + + raise socket.error("getaddrinfo returns an empty list") def _set_socket_options(sock, options): |