summaryrefslogtreecommitdiff
path: root/cloudinit/transforms/cc_rightscale_userdata.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-06-15 21:33:55 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-06-15 21:33:55 -0700
commit450261a1fcf1f8929a2f7a25c2c278ba40689289 (patch)
tree83430d74ea63c5a11df3fb774e281d0f8efce8f3 /cloudinit/transforms/cc_rightscale_userdata.py
parent784edb7689d60b81a4334d5171603841cc83da98 (diff)
downloadvyos-cloud-init-450261a1fcf1f8929a2f7a25c2c278ba40689289.tar.gz
vyos-cloud-init-450261a1fcf1f8929a2f7a25c2c278ba40689289.zip
Fixups to ensure that pylint does not find anything major wrong.
Diffstat (limited to 'cloudinit/transforms/cc_rightscale_userdata.py')
-rw-r--r--cloudinit/transforms/cc_rightscale_userdata.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/cloudinit/transforms/cc_rightscale_userdata.py b/cloudinit/transforms/cc_rightscale_userdata.py
index cde11b54..40d76c89 100644
--- a/cloudinit/transforms/cc_rightscale_userdata.py
+++ b/cloudinit/transforms/cc_rightscale_userdata.py
@@ -53,16 +53,19 @@ def handle(name, _cfg, cloud, log, _args):
try:
ud = cloud.get_userdata_raw()
except:
- log.warn("Failed to get raw userdata in module %s", name)
+ log.warn("Failed to get raw userdata in transform %s", name)
return
try:
mdict = parse_qs(ud)
if not mdict or not my_hookname in mdict:
- log.debug("Skipping module %s, did not find %s in parsed raw userdata", name, my_hookname)
+ log.debug(("Skipping transform %s, "
+ "did not find %s in parsed"
+ " raw userdata"), name, my_hookname)
return
except:
- log.warn("Failed to parse query string %s into a dictionary", ud)
+ util.logexc(log, ("Failed to parse query string %s"
+ " into a dictionary"), ud)
raise
wrote_fns = []
@@ -83,7 +86,8 @@ def handle(name, _cfg, cloud, log, _args):
wrote_fns.append(fname)
except Exception as e:
captured_excps.append(e)
- util.logexc(log, "%s failed to read %s and write %s", my_name, url, fname)
+ util.logexc(log, "%s failed to read %s and write %s",
+ my_name, url, fname)
if wrote_fns:
log.debug("Wrote out rightscale userdata to %s files", len(wrote_fns))
@@ -93,6 +97,6 @@ def handle(name, _cfg, cloud, log, _args):
log.debug("%s urls were skipped or failed", skipped)
if captured_excps:
- log.warn("%s failed with exceptions, re-raising the last one", len(captured_excps))
+ log.warn("%s failed with exceptions, re-raising the last one",
+ len(captured_excps))
raise captured_excps[-1]
-