diff options
-rw-r--r-- | CHANGES.txt | 2 | ||||
-rwxr-xr-x | setuptools/package_index.py | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 445934ee..7ef29cbe 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,8 @@ CHANGES 0.6.7 ----- +* Issue 21: Allow PackageIndex.open_url to gracefully handle all cases of a + httplib.HTTPException instead of just InvalidURL and BadStatusLine. * Removed virtual-python.py from this distribution and updated documentation to point to the actively maintained virtualenv instead. * Issue 64: use_setuptools no longer rebuilds the distribute egg every diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 98799de5..ee980214 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -602,6 +602,12 @@ class PackageIndex(Environment): raise DistutilsError('%s returned a bad status line. ' 'The server might be down, %s' % \ (url, v.line)) + except httplib.HTTPException, v: + if warning: + self.warn(warning, v) + else: + raise DistutilsError("Download error for %s: %s" + % (url, v)) def _download_url(self, scheme, url, tmpdir): # Determine download filename |