Hanno Schlichting avatar Hanno Schlichting committed e6564f1

Issue 21: Allow PackageIndex.open_url to gracefully handle all cases of a httplib.HTTPException instead of just InvalidURL and BadStatusLine.

Comments (0)

Files changed (2)

 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

setuptools/package_index.py

                 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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.