From 745732eb1dc512a2d5f939effe50b047a3b692d4 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sun, 4 Sep 2011 12:54:40 +0200 Subject: [PATCH] [molecule.utils] remove_path_sandbox: do not use Popen with shell=True but rather use glob.glob() --- molecule/utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/molecule/utils.py b/molecule/utils.py index 683febb..ee77f20 100644 --- a/molecule/utils.py +++ b/molecule/utils.py @@ -24,6 +24,7 @@ import tempfile import subprocess import signal import shutil +import glob import random random.seed() @@ -178,9 +179,9 @@ def remove_path_sandbox(path, sandbox_env, stdout = None, stderr = None): stdout = sys.stdout if stderr is None: stderr = sys.stderr - p = subprocess.Popen(' '.join(["sandbox", "rm", "-rf", path]), + p = subprocess.Popen(["sandbox", "rm", "-rf"] + glob.glob(path), stdout = stdout, stderr = stderr, - env = sandbox_env, shell = True + env = sandbox_env ) return p.wait()