Index: tools/bots/bot.py |
diff --git a/tools/bots/bot.py b/tools/bots/bot.py |
index cfd90760bf24227ac5451950224c34f8590c41de..b24fe74139bd1bc9aaa559ab9e3fc7ffe251d5cf 100644 |
--- a/tools/bots/bot.py |
+++ b/tools/bots/bot.py |
@@ -271,14 +271,17 @@ def RunTestRunner(build_info, path): |
RunProcess(args) |
-def RunProcess(command): |
+def RunProcess(command, env=None): |
""" |
Runs command. |
If a non-zero exit code is returned, raises an OSError with errno as the exit |
code. |
""" |
- no_color_env = dict(os.environ) |
+ if env is None: |
+ no_color_env = dict(os.environ) |
+ else: |
+ no_color_env = env |
no_color_env['TERM'] = 'nocolor' |
exit_code = subprocess.call(command, env=no_color_env) |