diff options
author | Ben Howard <ben.howard@canonical.com> | 2012-08-21 13:03:47 -0600 |
---|---|---|
committer | Ben Howard <ben.howard@canonical.com> | 2012-08-21 13:03:47 -0600 |
commit | 3f4a556e59b127d2fb6ebb57a8a42f6a71248b59 (patch) | |
tree | cec63a461ef1d09bd79a805365d5488b23e74e85 /cloudinit/config/cc_ssh_import_id.py | |
parent | 8aa59086146062fc767349be086fe0c35bf9c477 (diff) | |
download | vyos-cloud-init-3f4a556e59b127d2fb6ebb57a8a42f6a71248b59.tar.gz vyos-cloud-init-3f4a556e59b127d2fb6ebb57a8a42f6a71248b59.zip |
Implemented MP feedback.
Diffstat (limited to 'cloudinit/config/cc_ssh_import_id.py')
-rw-r--r-- | cloudinit/config/cc_ssh_import_id.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cloudinit/config/cc_ssh_import_id.py b/cloudinit/config/cc_ssh_import_id.py index f18e1fc5..e733d14a 100644 --- a/cloudinit/config/cc_ssh_import_id.py +++ b/cloudinit/config/cc_ssh_import_id.py @@ -25,19 +25,20 @@ from cloudinit import util distros = ['ubuntu'] -def handle(name, cfg, _cloud, log, args): +def handle(name, cfg, cloud, log, args): if len(args) != 0: user = args[0] ids = [] if len(args) > 1: ids = args[1:] else: + user = None + try: - user = cloud.distro.get_default_username() + user = cloud.distro.get_configured_user() except NotImplementedError: pass - user = None ids = util.get_cfg_option_list(cfg, "ssh_import_id", []) if len(ids) == 0: |