diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-01-17 15:59:21 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-01-17 15:59:21 -0500 |
commit | 1e746f00edbf478cf0ae43b66ff7899b6819fa33 (patch) | |
tree | 533a5f7b80ce1ec9a5cd2c670d2a781b6a54a4f1 /cloudinit/CloudConfig/cc_ssh.py | |
parent | d4c5cfd23e693959a1478e4bf59a08e4dce9ca6c (diff) | |
parent | dcb543887bcb0770bbb7b102e9d6a7c732d0228d (diff) | |
download | vyos-cloud-init-1e746f00edbf478cf0ae43b66ff7899b6819fa33.tar.gz vyos-cloud-init-1e746f00edbf478cf0ae43b66ff7899b6819fa33.zip |
miscellaneous cleanups, and add tools/run-pylint
adding run-pylint makes it easy to run pylint with given configuration
against the code.
Diffstat (limited to 'cloudinit/CloudConfig/cc_ssh.py')
-rw-r--r-- | cloudinit/CloudConfig/cc_ssh.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/cloudinit/CloudConfig/cc_ssh.py b/cloudinit/CloudConfig/cc_ssh.py index 39862117..cdf90bdc 100644 --- a/cloudinit/CloudConfig/cc_ssh.py +++ b/cloudinit/CloudConfig/cc_ssh.py @@ -25,12 +25,8 @@ DISABLE_ROOT_OPTS = "no-port-forwarding,no-agent-forwarding," \ "no-X11-forwarding,command=\"echo \'Please login as the user \\\"$USER\\\" " \ "rather than the user \\\"root\\\".\';echo;sleep 10\"" -global_log = None - def handle(_name, cfg, cloud, log, _args): - global global_log - global_log = log # remove the static keys from the pristine image if cfg.get("ssh_deletekeys", True): @@ -87,14 +83,14 @@ def handle(_name, cfg, cloud, log, _args): cfgkeys = cfg["ssh_authorized_keys"] keys.extend(cfgkeys) - apply_credentials(keys, user, disable_root, disable_root_opts) + apply_credentials(keys, user, disable_root, disable_root_opts, log) except: util.logexc(log) log.warn("applying credentials failed!\n") def apply_credentials(keys, user, disable_root, - disable_root_opts=DISABLE_ROOT_OPTS, log=global_log): + disable_root_opts=DISABLE_ROOT_OPTS, log=None): keys = set(keys) if user: sshutil.setup_user_keys(keys, user, '', log) |