aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHanno Schlichting <hanno@hannosch.eu>2009-10-24 01:24:05 +0200
committerHanno Schlichting <hanno@hannosch.eu>2009-10-24 01:24:05 +0200
commit9b02ba04ef7690724330d3d8ff35cd38284d3b07 (patch)
tree50f989e2ec8a37fd923a4cdd94850f2cd7183f0d
parent43d34734c801d2d9a72d5fa6e7fc74d80bdc11c1 (diff)
downloadexternal_python_setuptools-9b02ba04ef7690724330d3d8ff35cd38284d3b07.tar.gz
external_python_setuptools-9b02ba04ef7690724330d3d8ff35cd38284d3b07.tar.bz2
external_python_setuptools-9b02ba04ef7690724330d3d8ff35cd38284d3b07.zip
Issue 21: Allow PackageIndex.open_url to gracefully handle all cases of a httplib.HTTPException instead of just InvalidURL and BadStatusLine.
--HG-- branch : distribute extra : rebase_source : 24986ae1074b564fbd8c34a227265afd3b90ebce
-rw-r--r--CHANGES.txt2
-rwxr-xr-xsetuptools/package_index.py6
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