Only split a command_string if its not a list

This commit is contained in:
Joshua Boniface 2023-10-23 09:50:58 -04:00
parent 50aabde320
commit fabb97cf48
1 changed files with 5 additions and 1 deletions

View File

@ -146,7 +146,11 @@ def run_os_daemon(command_string, environment=None, logfile=None):
# Run a local OS command via shell # Run a local OS command via shell
# #
def run_os_command(command_string, background=False, environment=None, timeout=None): 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: if background:
def runcmd(): def runcmd():