summaryrefslogtreecommitdiff
path: root/cloudinit/config
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2012-11-12 22:21:20 -0500
committerScott Moser <smoser@ubuntu.com>2012-11-12 22:21:20 -0500
commit546b9444158d00875100fdd523fccae76226f346 (patch)
tree4853b6eb2719d6a7b2d692cb9210562fe3a84898 /cloudinit/config
parent949e1759342b1e60c100855aaf250165bcb9997e (diff)
downloadvyos-cloud-init-546b9444158d00875100fdd523fccae76226f346.tar.gz
vyos-cloud-init-546b9444158d00875100fdd523fccae76226f346.zip
pass execmd a list, not tuple or string
Diffstat (limited to 'cloudinit/config')
-rw-r--r--cloudinit/config/cc_finalcmd.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/config/cc_finalcmd.py b/cloudinit/config/cc_finalcmd.py
index 442ad12b..d921a444 100644
--- a/cloudinit/config/cc_finalcmd.py
+++ b/cloudinit/config/cc_finalcmd.py
@@ -78,7 +78,7 @@ def execmd(exe_args, data_in=None, output=None):
def runfinal(shellcode, finalcmd_d, output=None):
- ret = execmd(("/bin/sh",), data_in=shellcode, output=output)
+ ret = execmd(["/bin/sh",], data_in=shellcode, output=output)
if not (finalcmd_d and os.path.isdir(finalcmd_d)):
sys.exit(ret)
@@ -90,7 +90,7 @@ def runfinal(shellcode, finalcmd_d, output=None):
for exe_name in sorted(os.listdir(finalcmd_d)):
exe_path = os.path.join(finalcmd_d, exe_name)
if os.path.isfile(exe_path) and os.access(exe_path, os.X_OK):
- ret = execmd(exe_path, data_in=None, output=output)
+ ret = execmd([exe_path], data_in=None, output=output)
if ret != 0:
fails += 1
sys.exit(fails)