summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2013-05-03 15:11:32 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2013-05-03 15:11:32 -0700
commite4677e5ef69ff523459d97405dcf90fe6818555e (patch)
treeb3cd617d689ebe5df75586e08e1d30412e3f1fe3
parent4697c1afcc7d05951f4717a83dad01d2360301c6 (diff)
downloadvyos-cloud-init-e4677e5ef69ff523459d97405dcf90fe6818555e.tar.gz
vyos-cloud-init-e4677e5ef69ff523459d97405dcf90fe6818555e.zip
Fix a feature that doesn't yet exist on python 2.6
-rw-r--r--cloudinit/url_helper.py9
1 files changed, 7 insertions, 2 deletions
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: