summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_ssh.py
diff options
context:
space:
mode:
authorJuerg Haefliger <juergh@gmail.com>2013-06-20 15:46:08 -0400
committerScott Moser <smoser@ubuntu.com>2013-06-20 15:46:08 -0400
commit852968303724c979b7a94ed69abdcff9c0e3cc93 (patch)
tree4d7a925f5f4f56d618c2d7d9b1971b0fb1a7fe08 /cloudinit/config/cc_ssh.py
parent812f82e7b3bad3f8127face552c76ef974b54661 (diff)
parent2f853948f269f50038533782ee45e381d60d02bf (diff)
downloadvyos-cloud-init-852968303724c979b7a94ed69abdcff9c0e3cc93.tar.gz
vyos-cloud-init-852968303724c979b7a94ed69abdcff9c0e3cc93.zip
fix and tidy up logexc usage
Some of the usages of logexc contain incorrect arguments to logexc. cloudinit/config/cc_ssh_import_id.py cloudinit/distros/__init__.py The tidy up here is to fix many others that pass rendered strings to logexc rather than letting it handle rendering at a later date (or not at all in the case where logging is disabled).
Diffstat (limited to 'cloudinit/config/cc_ssh.py')
-rw-r--r--cloudinit/config/cc_ssh.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/cloudinit/config/cc_ssh.py b/cloudinit/config/cc_ssh.py
index 7ef20d9f..64a5e3cb 100644
--- a/cloudinit/config/cc_ssh.py
+++ b/cloudinit/config/cc_ssh.py
@@ -1,7 +1,7 @@
# vi: ts=4 expandtab
#
# Copyright (C) 2009-2010 Canonical Ltd.
-# Copyright (C) 2012 Hewlett-Packard Development Company, L.P.
+# Copyright (C) 2012, 2013 Hewlett-Packard Development Company, L.P.
#
# Author: Scott Moser <scott.moser@canonical.com>
# Author: Juerg Haefliger <juerg.haefliger@hp.com>
@@ -85,8 +85,8 @@ def handle(_name, cfg, cloud, log, _args):
util.subp(cmd, capture=False)
log.debug("Generated a key for %s from %s", pair[0], pair[1])
except:
- util.logexc(log, ("Failed generated a key"
- " for %s from %s"), pair[0], pair[1])
+ util.logexc(log, "Failed generated a key for %s from %s",
+ pair[0], pair[1])
else:
# if not, generate them
genkeys = util.get_cfg_option_list(cfg,
@@ -102,8 +102,8 @@ def handle(_name, cfg, cloud, log, _args):
with util.SeLinuxGuard("/etc/ssh", recursive=True):
util.subp(cmd, capture=False)
except:
- util.logexc(log, ("Failed generating key type"
- " %s to file %s"), keytype, keyfile)
+ util.logexc(log, "Failed generating key type %s to "
+ "file %s", keytype, keyfile)
try:
(users, _groups) = ds.normalize_users_groups(cfg, cloud.distro)