diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-11-07 10:42:54 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-11-07 10:42:54 -0500 |
commit | 21a3cf3186809f9dae387e52e8bd9bc548981003 (patch) | |
tree | d82d3c05e0f295ad2dda2dee5d0ca5b6ab116b78 /cloudinit/config/cc_ssh_authkey_fingerprints.py | |
parent | e6d4b76e5e60ff558c247ad76acd27343afe367c (diff) | |
parent | 8b677bc80a39a0eb1a3cc7989c6bffb959fc7a69 (diff) | |
download | vyos-cloud-init-21a3cf3186809f9dae387e52e8bd9bc548981003.tar.gz vyos-cloud-init-21a3cf3186809f9dae387e52e8bd9bc548981003.zip |
test and path cleanups.
1. Remove the usage of the path.join function now that all code should
be going through the util file methods (and they can be mocked out as
needed).
2. Adjust all occurences of the above join function to either not use it
or replace it with the standard os.path.join (which can also be mocked
out as needed)
3. Fix pylint from complaining about the tests folder 'helpers.py' not
being found.
4. Add a pylintrc file that is used instead of the options hidden in the
'run_pylint' tool.
Diffstat (limited to 'cloudinit/config/cc_ssh_authkey_fingerprints.py')
-rw-r--r-- | cloudinit/config/cc_ssh_authkey_fingerprints.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/cloudinit/config/cc_ssh_authkey_fingerprints.py b/cloudinit/config/cc_ssh_authkey_fingerprints.py index 8c9a8806..c38bcea2 100644 --- a/cloudinit/config/cc_ssh_authkey_fingerprints.py +++ b/cloudinit/config/cc_ssh_authkey_fingerprints.py @@ -97,9 +97,8 @@ def handle(name, cfg, cloud, log, _args): "logging of ssh fingerprints disabled"), name) hash_meth = util.get_cfg_option_str(cfg, "authkey_hash", "md5") - extract_func = ssh_util.extract_authorized_keys (users, _groups) = ds.normalize_users_groups(cfg, cloud.distro) for (user_name, _cfg) in users.items(): - (auth_key_fn, auth_key_entries) = extract_func(user_name, cloud.paths) - _pprint_key_entries(user_name, auth_key_fn, - auth_key_entries, hash_meth) + (key_fn, key_entries) = ssh_util.extract_authorized_keys(user_name) + _pprint_key_entries(user_name, key_fn, + key_entries, hash_meth) |