diff options
author | PJ Eby <distutils-sig@python.org> | 2006-06-20 21:21:08 +0000 |
---|---|---|
committer | PJ Eby <distutils-sig@python.org> | 2006-06-20 21:21:08 +0000 |
commit | cf2cb97ab9dcb6b4245e0b4784f916a1c50c5156 (patch) | |
tree | 3b9c16b316705a0d17d1f6fbb26543c3cc4cec52 /setuptools/package_index.py | |
parent | 3df0e5d77cbc397627f0af7f20fdcf34af199caa (diff) | |
download | external_python_setuptools-cf2cb97ab9dcb6b4245e0b4784f916a1c50c5156.tar.gz external_python_setuptools-cf2cb97ab9dcb6b4245e0b4784f916a1c50c5156.tar.bz2 external_python_setuptools-cf2cb97ab9dcb6b4245e0b4784f916a1c50c5156.zip |
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
Diffstat (limited to 'setuptools/package_index.py')
-rwxr-xr-x | setuptools/package_index.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 2760dc8d..d13bfc0f 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -162,7 +162,7 @@ class PackageIndex(Environment): 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 return |