From e4677e5ef69ff523459d97405dcf90fe6818555e Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Fri, 3 May 2013 15:11:32 -0700 Subject: Fix a feature that doesn't yet exist on python 2.6 --- cloudinit/url_helper.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'cloudinit') diff --git a/cloudinit/url_helper.py b/cloudinit/url_helper.py index 24ce6871..19a30409 100644 --- a/cloudinit/url_helper.py +++ b/cloudinit/url_helper.py @@ -165,9 +165,14 @@ def readurl(url, data=None, timeout=None, retries=0, sec_between=1, for i in range(0, manual_tries): try: req_args['headers'] = headers_cb(url) + filtered_req_args = {} + for (k, v) in req_args.items(): + if k == 'data': + continue + filtered_req_args[k] = v + LOG.debug("[%s/%s] open '%s' with %s configuration", i, - manual_tries, url, - {k: req_args[k] for k in req_args if k != 'data'}) + manual_tries, url, filtered_req_args) r = requests.request(**req_args) if check_status: -- cgit v1.2.3