Commit cf2cb97a authored by PJ Eby's avatar PJ Eby

Fix ``ftp://`` directory listing URLs from causing a crash when used in

the "Home page" or "Download URL" slots on PyPI.
(merged from the trunk)

--HG--
branch : setuptools-0.6
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4047051
parent 3df0e5d7
...@@ -1098,6 +1098,9 @@ Release Notes/Change History ...@@ -1098,6 +1098,9 @@ Release Notes/Change History
0.6b4 0.6b4
* Fix creating Python wrappers for non-Python scripts * Fix creating Python wrappers for non-Python scripts
* Fix ``ftp://`` directory listing URLs from causing a crash when used in the
"Home page" or "Download URL" slots on PyPI.
0.6b3 0.6b3
* Fix local ``--find-links`` eggs not being copied except with * Fix local ``--find-links`` eggs not being copied except with
``--always-copy``. ``--always-copy``.
......
...@@ -162,7 +162,7 @@ class PackageIndex(Environment): ...@@ -162,7 +162,7 @@ class PackageIndex(Environment):
self.fetched_urls[url] = self.fetched_urls[f.url] = True self.fetched_urls[url] = self.fetched_urls[f.url] = True
if 'html' not in f.headers['content-type'].lower(): if 'html' not in f.headers.get('content-type', '').lower():
f.close() # not html, we can't process it f.close() # not html, we can't process it
return return
......
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