diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-09-28 14:06:22 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-09-28 14:06:22 -0700 |
commit | 7ab25c779433a614a6e4101ddfe852fc25f39c01 (patch) | |
tree | 6c78d9b9a6849f17535ee2f2a2bae1b62d1adadf /cloudinit/config/cc_ssh_authkey_fingerprints.py | |
parent | cf3dd1ba86d4ddde149f451e026c697c07b4d732 (diff) | |
download | vyos-cloud-init-7ab25c779433a614a6e4101ddfe852fc25f39c01.tar.gz vyos-cloud-init-7ab25c779433a614a6e4101ddfe852fc25f39c01.zip |
Add a comment as to why distros can't be
imported without being renamed due to
previous usage of the attribute 'distros'
Diffstat (limited to 'cloudinit/config/cc_ssh_authkey_fingerprints.py')
-rw-r--r-- | cloudinit/config/cc_ssh_authkey_fingerprints.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cloudinit/config/cc_ssh_authkey_fingerprints.py b/cloudinit/config/cc_ssh_authkey_fingerprints.py index 32214fba..8c9a8806 100644 --- a/cloudinit/config/cc_ssh_authkey_fingerprints.py +++ b/cloudinit/config/cc_ssh_authkey_fingerprints.py @@ -21,7 +21,11 @@ import hashlib from prettytable import PrettyTable -from cloudinit import distros +# Ensure this is aliased to a name not 'distros' +# since the module attribute 'distros' +# is a list of distros that are supported, not a sub-module +from cloudinit import distros as ds + from cloudinit import ssh_util from cloudinit import util @@ -94,7 +98,7 @@ def handle(name, cfg, cloud, log, _args): hash_meth = util.get_cfg_option_str(cfg, "authkey_hash", "md5") extract_func = ssh_util.extract_authorized_keys - (users, _groups) = distros.normalize_users_groups(cfg, cloud.distro) + (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, |