Commit ac7808e6 authored by PJ Eby's avatar PJ Eby

Fix not recognizing HTML 404 pages from package indexes.

(backport from trunk)

--HG--
branch : setuptools-0.6
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4050552
parent 9ba52cf3
......@@ -1104,6 +1104,8 @@ Release Notes/Change History
* Fix ``sys.path_importer_cache`` not being updated when an existing zipfile
or directory is deleted/overwritten.
* Fix not recognizing HTML 404 pages from package indexes.
0.6b3
* Fix local ``--find-links`` eggs not being copied except with
``--always-copy``.
......
......@@ -169,7 +169,7 @@ class PackageIndex(Environment):
base = f.url # handle redirects
page = f.read()
f.close()
if url.startswith(self.index_url):
if url.startswith(self.index_url) and getattr(f,'code',None)!=404:
page = self.process_index(url, page)
for match in HREF.finditer(page):
......@@ -253,7 +253,7 @@ class PackageIndex(Environment):
def scan_all(self, msg=None, *args):
if self.index_url not in self.fetched_urls:
if msg: self.warn(msg,*args)
self.warn(
self.info(
"Scanning index of all packages (this may take a while)"
)
self.scan_url(self.index_url)
......
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