diff options
author | PJ Eby <distutils-sig@python.org> | 2007-08-24 03:38:27 +0000 |
---|---|---|
committer | PJ Eby <distutils-sig@python.org> | 2007-08-24 03:38:27 +0000 |
commit | 996980750968d02c921bcfd33562969e97573ed9 (patch) | |
tree | f6bf66012600d9add15df9ffb7ede3ce436d9953 /setuptools/package_index.py | |
parent | ab69c26ccc5d8c178f3f6d7d1c7e52ab7a47d179 (diff) | |
download | external_python_setuptools-996980750968d02c921bcfd33562969e97573ed9.tar.gz external_python_setuptools-996980750968d02c921bcfd33562969e97573ed9.tar.bz2 external_python_setuptools-996980750968d02c921bcfd33562969e97573ed9.zip |
``ftp:`` download URLs now work correctly. (backport from trunk)
--HG--
branch : setuptools-0.6
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4057371
Diffstat (limited to 'setuptools/package_index.py')
-rwxr-xr-x | setuptools/package_index.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 3da253a5..d558b648 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -619,7 +619,7 @@ class PackageIndex(Environment): def _attempt_download(self, url, filename): headers = self._download_to(url, filename) - if 'html' in headers['content-type'].lower(): + if 'html' in headers.get('content-type','').lower(): return self._download_html(url, headers, filename) else: return filename @@ -695,7 +695,6 @@ def htmldecode(text): - def open_with_auth(url): """Open a urllib2 request, handling HTTP authentication""" |