From b672805ffe0c8ef4be0acc0ce05d5273f25d6533 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Thu, 2 Jun 2011 02:10:13 +0200 Subject: make sure we don't use getheaders(). get() works for all py versions - fixes #206 --HG-- branch : distribute extra : rebase_source : c9e414a0642dd5b2222dd3fc4aa1b11a442e48a1 --- CHANGES.txt | 3 ++- distribute.egg-info/entry_points.txt | 2 +- setuptools/package_index.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index d085b754..5f92af2d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,7 +6,8 @@ CHANGES 0.6.19 ------ -* ADD STUFF HERE +* Issue 206: AttributeError: 'HTTPMessage' object has no attribute 'getheaders' + ------ 0.6.18 diff --git a/distribute.egg-info/entry_points.txt b/distribute.egg-info/entry_points.txt index 1c9f123d..9fd41758 100644 --- a/distribute.egg-info/entry_points.txt +++ b/distribute.egg-info/entry_points.txt @@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-2.6 = setuptools.command.easy_install:main +easy_install-2.7 = setuptools.command.easy_install:main [setuptools.file_finders] svn_cvs = setuptools.command.sdist:_default_revctrl diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 0230497d..f064b110 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -580,7 +580,7 @@ class PackageIndex(Environment): size = -1 if "content-length" in headers: # Some servers return multiple Content-Length headers :( - content_length = headers.getheaders("Content-Length")[0] + content_length = headers.get("Content-Length") size = int(content_length) self.reporthook(url, filename, blocknum, bs, size) tfp = open(filename,'wb') -- cgit v1.2.1