diff options
author | James Falcon <james.falcon@canonical.com> | 2023-01-13 12:07:54 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-13 11:07:54 -0700 |
commit | 9b414bcf704de466841f733d84314ad849555596 (patch) | |
tree | ead7dc049a31e746049a09f23c86722ebdec6285 /cloudinit/config | |
parent | c2545534c437be08b1cc97f5166d3c2c97bf46a3 (diff) | |
download | cloud-init-git-9b414bcf704de466841f733d84314ad849555596.tar.gz |
Fix wrong subp syntax in cc_set_passwords.py (#1961)
In #1909, I added a subp call with incorrect syntax. Fixing that here.
Diffstat (limited to 'cloudinit/config')
-rw-r--r-- | cloudinit/config/cc_set_passwords.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cloudinit/config/cc_set_passwords.py b/cloudinit/config/cc_set_passwords.py index 850fef86..b04530e3 100644 --- a/cloudinit/config/cc_set_passwords.py +++ b/cloudinit/config/cc_set_passwords.py @@ -145,7 +145,14 @@ def handle_ssh_pwauth(pw_auth, distro: Distro): if distro.uses_systemd(): state = subp.subp( - f"systemctl show --property ActiveState --value {service}" + [ + "systemctl", + "show", + "--property", + "ActiveState", + "--value", + service, + ] ).stdout if state.lower() in ["active", "activating", "reloading"]: distro.manage_service("restart", service) |