diff options
| author | Joshua Harlow <harlowja@yahoo-inc.com> | 2013-05-13 14:47:48 -0700 | 
|---|---|---|
| committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2013-05-13 14:47:48 -0700 | 
| commit | 0716acc6ad387d61ccbaf358c13979d2efb9a6bc (patch) | |
| tree | 87f70636fa7591544273e39a4accc43a9e3b2f6f | |
| parent | 638cc131857582e3df0c35b8a49433c660fdd299 (diff) | |
| parent | e4677e5ef69ff523459d97405dcf90fe6818555e (diff) | |
| download | vyos-cloud-init-0716acc6ad387d61ccbaf358c13979d2efb9a6bc.tar.gz vyos-cloud-init-0716acc6ad387d61ccbaf358c13979d2efb9a6bc.zip | |
Fix how python 2.6 was broken due to new dict syntax.
Said syntax doesn't exist in RHEL since it is new to 2.7.
| -rw-r--r-- | cloudinit/url_helper.py | 9 | 
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: | 
