diff options
Diffstat (limited to 'support/lib')
-rw-r--r-- | support/lib/util.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/support/lib/util.py b/support/lib/util.py index 8b65e58..45ecb89 100644 --- a/support/lib/util.py +++ b/support/lib/util.py @@ -15,8 +15,17 @@ def TemporaryDirectory(): shutil.rmtree(dir) -def command(args): - process = subprocess.Popen(args) +def command(args, remove_env = None): + if remove_env is None: + env = None + else: + env = dict(os.environ) + + for i in remove_env: + if i in env: + del env[i] + + process = subprocess.Popen(args, env = env) process.wait() if process.returncode: |