Commit b672805f authored by Tarek Ziade's avatar Tarek Ziade

make sure we don't use getheaders(). get() works for all py versions - fixes #206

--HG--
branch : distribute
extra : rebase_source : c9e414a0642dd5b2222dd3fc4aa1b11a442e48a1
parent 8d8653a2
...@@ -6,7 +6,8 @@ CHANGES ...@@ -6,7 +6,8 @@ CHANGES
0.6.19 0.6.19
------ ------
* ADD STUFF HERE * Issue 206: AttributeError: 'HTTPMessage' object has no attribute 'getheaders'
------ ------
0.6.18 0.6.18
......
...@@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete ...@@ -32,7 +32,7 @@ depends.txt = setuptools.command.egg_info:warn_depends_obsolete
[console_scripts] [console_scripts]
easy_install = setuptools.command.easy_install:main 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] [setuptools.file_finders]
svn_cvs = setuptools.command.sdist:_default_revctrl svn_cvs = setuptools.command.sdist:_default_revctrl
......
...@@ -580,7 +580,7 @@ class PackageIndex(Environment): ...@@ -580,7 +580,7 @@ class PackageIndex(Environment):
size = -1 size = -1
if "content-length" in headers: if "content-length" in headers:
# Some servers return multiple Content-Length 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) size = int(content_length)
self.reporthook(url, filename, blocknum, bs, size) self.reporthook(url, filename, blocknum, bs, size)
tfp = open(filename,'wb') tfp = open(filename,'wb')
......
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