diff options
author | Julien Muchembled <jm@nexedi.com> | 2016-11-14 00:25:57 +0100 |
---|---|---|
committer | Julien Muchembled <jm@nexedi.com> | 2016-11-14 00:56:24 +0100 |
commit | 161c0a5072f6049f6e4790969a387e9aae41ad52 (patch) | |
tree | 335ccbb92a4e822ddd19bb30a375f3d73a111e09 /setuptools/package_index.py | |
parent | a64fcd4860742158669474a9107921345bbc65c1 (diff) | |
download | external_python_setuptools-161c0a5072f6049f6e4790969a387e9aae41ad52.tar.gz external_python_setuptools-161c0a5072f6049f6e4790969a387e9aae41ad52.tar.bz2 external_python_setuptools-161c0a5072f6049f6e4790969a387e9aae41ad52.zip |
package_index: fix bug not catching some network timeouts
There are already so many exceptions catched, like socket errors (e.g. failure
in name resolution) or HTTP errors. Depending on when a timeout occurs, it is
either catched (URLError during the SSL handshake) or not (socket.error while
getting a HTTP response).
When used by buildout, this fixes random failures when running in newest mode
(which is the default case), or when the requested version is available in the
download-cache.
Diffstat (limited to 'setuptools/package_index.py')
-rwxr-xr-x | setuptools/package_index.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 024fab98..d80d43bc 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -768,7 +768,7 @@ class PackageIndex(Environment): 'down, %s' % (url, v.line) ) - except http_client.HTTPException as v: + except (http_client.HTTPException, socket.error) as v: if warning: self.warn(warning, v) else: |