[Distutils] [setuptools] 0.6c1 package_index.py swallows KeyboardInterrupt
John J Lee
jjl at pobox.com
Thu Aug 3 22:32:29 CEST 2006
If an error occurs on the first download attempt, the subsequent attempts
by easy_install to download a file can't be properly interrupted with
Control-C (instead of terminating the process, it just jumps to the next
of ten or fifteen mirrors). Here's the fix:
---
/usr/lib/python2.4/site-packages/setuptools-0.6c1-py2.4.egg/setuptools/package_index.py~ 2006-08-03 20:04:28.000000000 +0000
+++
/usr/lib/python2.4/site-packages/setuptools-0.6c1-py2.4.egg/setuptools/package_index.py 2006-08-03 20:21:18.000000000 +0000
@@ -589,6 +589,8 @@
url = urlparse.urlunparse((scheme, mirror, path, param, '', frag))
try:
return self._download_to(url, filename)
+ except (KeyboardInterrupt,SystemExit):
+ raise
except:
_sf_mirrors.remove(mirror) # don't retry the same mirror
mirror = get_sf_ip()
John
More information about the Distutils-SIG
mailing list