aboutsummaryrefslogtreecommitdiff
path: root/lldb/scripts/Python/prepare_binding_Python.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/scripts/Python/prepare_binding_Python.py')
-rw-r--r--lldb/scripts/Python/prepare_binding_Python.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/scripts/Python/prepare_binding_Python.py b/lldb/scripts/Python/prepare_binding_Python.py
index 1688af4..107f897 100644
--- a/lldb/scripts/Python/prepare_binding_Python.py
+++ b/lldb/scripts/Python/prepare_binding_Python.py
@@ -264,8 +264,9 @@ def run_python_script(script_and_args):
@param script_and_args the python script to execute, along with
the command line arguments to pass to it.
"""
- command_line = "%s %s" % (sys.executable, script_and_args)
- process = subprocess.Popen(command_line, shell=True)
+ command = [sys.executable] + script_and_args
+ command_line = " ".join(command)
+ process = subprocess.Popen(command, shell=False)
script_stdout, script_stderr = process.communicate()
return_code = process.returncode
if return_code != 0:
@@ -294,8 +295,7 @@ def do_modify_python_lldb(options, config_build_dir):
logging.error("failed to find python script: '%s'", script_path)
sys.exit(-11)
- script_invocation = "%s %s" % (script_path, config_build_dir)
- run_python_script(script_invocation)
+ run_python_script([script_path, config_build_dir])
def get_python_module_path(options):