From 6af944a73d2aaacf2cfe2acf7a31cb6b07721cfa Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Tue, 3 Sep 2019 21:14:00 +0200 Subject: [PATCH] Fix shellexec --- wo/core/shellexec.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wo/core/shellexec.py b/wo/core/shellexec.py index adf9241..9cfd191 100644 --- a/wo/core/shellexec.py +++ b/wo/core/shellexec.py @@ -54,9 +54,8 @@ class WOShellExec(): def cmd_exec_stdout(self, command, errormsg='', log=True): """Run shell command from Python""" try: - log and Log.debug(self, "Running command: command -v {0}".format(command)) - check_command = 'command -v' + command - with subprocess.Popen([check_command], stdout=subprocess.PIPE, + log and Log.debug(self, "Running command: {0}".format(command)) + with subprocess.Popen([command], stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) as proc: (cmd_stdout_bytes, cmd_stderr_bytes) = proc.communicate() (cmd_stdout, cmd_stderr) = (cmd_stdout_bytes.decode('utf-8',