diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-06-15 21:33:55 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-06-15 21:33:55 -0700 |
commit | 450261a1fcf1f8929a2f7a25c2c278ba40689289 (patch) | |
tree | 83430d74ea63c5a11df3fb774e281d0f8efce8f3 /cloudinit/transforms/cc_runcmd.py | |
parent | 784edb7689d60b81a4334d5171603841cc83da98 (diff) | |
download | vyos-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_runcmd.py')
-rw-r--r-- | cloudinit/transforms/cc_runcmd.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cloudinit/transforms/cc_runcmd.py b/cloudinit/transforms/cc_runcmd.py index 19c0e721..31a254a5 100644 --- a/cloudinit/transforms/cc_runcmd.py +++ b/cloudinit/transforms/cc_runcmd.py @@ -25,13 +25,14 @@ from cloudinit import util def handle(name, cfg, cloud, log, _args): if "runcmd" not in cfg: - log.debug("Skipping module named %s, no 'runcmd' key in configuration", name) + log.debug(("Skipping transform named %s," + " no 'runcmd' key in configuration"), name) return - outfile = os.path.join(cloud.get_ipath('scripts'), "runcmd") + out_fn = os.path.join(cloud.get_ipath('scripts'), "runcmd") cmd = cfg["runcmd"] try: content = util.shellify(cmd) - util.write_file(outfile, content, 0700) + util.write_file(out_fn, content, 0700) except: - util.logexc(log, "Failed to shellify %s into file %s", cmd, outfile) + util.logexc(log, "Failed to shellify %s into file %s", cmd, out_fn) |