Commit 9b02ba04 authored by Hanno Schlichting's avatar Hanno Schlichting

Issue 21: Allow PackageIndex.open_url to gracefully handle all cases of a...

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
parent 43d34734
......@@ -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
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment