From fabb97cf48e9dfb78584a21883e816f0949cbb87 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Mon, 23 Oct 2023 09:50:58 -0400 Subject: [PATCH] Only split a command_string if its not a list --- daemon-common/common.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/daemon-common/common.py b/daemon-common/common.py index 0883a541..253a11f2 100644 --- a/daemon-common/common.py +++ b/daemon-common/common.py @@ -146,7 +146,11 @@ def run_os_daemon(command_string, environment=None, logfile=None): # Run a local OS command via shell # def run_os_command(command_string, background=False, environment=None, timeout=None): - command = shlex_split(command_string) + if not isinstance(command_string, list): + command = shlex_split(command_string) + else: + command = command_string + if background: def runcmd():