From f3cc94949d9f153b4a5135f8b989ff11b36ab7ea Mon Sep 17 00:00:00 2001 From: Shreenidhi Shedi <53473811+sshedi@users.noreply.github.com> Date: Tue, 14 Sep 2021 01:11:45 +0530 Subject: Improve ug_util.py (#1013) No functional changes. --- cloudinit/config/cc_set_passwords.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cloudinit/config') diff --git a/cloudinit/config/cc_set_passwords.py b/cloudinit/config/cc_set_passwords.py index 433de751..803a3aa9 100755 --- a/cloudinit/config/cc_set_passwords.py +++ b/cloudinit/config/cc_set_passwords.py @@ -133,7 +133,7 @@ def handle_ssh_pwauth(pw_auth, service_cmd=None, service_name="ssh"): def handle(_name, cfg, cloud, log, args): - if len(args) != 0: + if args: # if run from command line, and give args, wipe the chpasswd['list'] password = args[0] if 'chpasswd' in cfg and 'list' in cfg['chpasswd']: -- cgit v1.2.3