make_http_request: fix request arguments
authorZac Medico <zmedico@gentoo.org>
Fri, 3 Jun 2011 21:47:55 +0000 (14:47 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 3 Jun 2011 21:47:55 +0000 (14:47 -0700)
This will fix "TypeError: must be string or buffer, not dict" with
python 2.7, as reported in bug #369913.

pym/portage/getbinpkg.py

index 68e4543fc87eb095c82566335db94cf6debe82d0..a511f51ff0dbe46fec2f9171924f4779d59c64a8 100644 (file)
@@ -261,7 +261,7 @@ def make_http_request(conn, address, params={}, headers={}, dest=None):
                try:
                        if (rc != 0):
                                conn,ignore,ignore,ignore,ignore = create_conn(address)
-                       conn.request("GET", address, params, headers)
+                       conn.request("GET", address, body=None, headers=headers)
                except SystemExit as e:
                        raise
                except Exception as e: