From 0fb21a270f8844da6ed43caaf21a2c0b8ec89161 Mon Sep 17 00:00:00 2001 From: Claudio-Daniel Freire Date: Wed, 7 Sep 2011 23:52:11 +0200 Subject: [PATCH] Do not use shell=True with Popen, some distros use dash, we need bash. --- src/nepi/util/server.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/nepi/util/server.py b/src/nepi/util/server.py index ffed2c7b..704984c2 100644 --- a/src/nepi/util/server.py +++ b/src/nepi/util/server.py @@ -846,7 +846,6 @@ def popen_python(python_code, sudo = False, environment_setup = ""): - shell = False cmd = "" if python_path: python_path.replace("'", r"'\''") @@ -891,12 +890,11 @@ def popen_python(python_code, server_key, host, port, args) args.append(cmd) else: - args = cmd - shell = True + args = [ "/bin/bash", "-c", cmd ] # connects to the remote host and starts a remote proc = subprocess.Popen(args, - shell = shell, + shell = False, stdout = subprocess.PIPE, stdin = subprocess.PIPE, stderr = subprocess.PIPE) -- 2.47.0