Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(570)

Unified Diff: lib/cros_build_lib.py

Issue 6519035: Hide archive build output unless it fails. (Closed) Base URL: http://git.chromium.org/git/chromite.git@master
Patch Set: Fix logic Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« buildbot/cbuildbot.py ('K') | « buildbot/cbuildbot.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/cros_build_lib.py
diff --git a/lib/cros_build_lib.py b/lib/cros_build_lib.py
index c2e54b715d619813bfc30fc9a157870c72ffd5c4..fe30fcbcf705c11fb6767b55fc934053887538c7 100644
--- a/lib/cros_build_lib.py
+++ b/lib/cros_build_lib.py
@@ -34,7 +34,7 @@ class RunCommandError(Exception):
def RunCommand(cmd, print_cmd=True, error_ok=False, error_message=None,
exit_code=False, redirect_stdout=False, redirect_stderr=False,
cwd=None, input=None, enter_chroot=False, shell=False,
- env=None, ignore_sigint=False):
+ env=None, ignore_sigint=False, combine_stdout_stderr=False):
"""Runs a command.
Args:
@@ -56,6 +56,7 @@ def RunCommand(cmd, print_cmd=True, error_ok=False, error_message=None,
child. This is the desired behavior if we know our child will handle
Ctrl-C. If we don't do this, I think we and the child will both get
Ctrl-C at the same time, which means we'll forcefully kill the child.
+ combine_stdout_stderr: Combines stdout and stdin streams into stdout.
Returns:
A CommandResult object.
@@ -72,6 +73,7 @@ def RunCommand(cmd, print_cmd=True, error_ok=False, error_message=None,
# Modify defaults based on parameters.
if redirect_stdout: stdout = subprocess.PIPE
if redirect_stderr: stderr = subprocess.PIPE
+ if combine_stdout_stderr: stderr = subprocess.STDOUT
# TODO(sosa): gpylint complains about redefining built-in 'input'.
# Can we rename this variable?
if input: stdin = subprocess.PIPE
« buildbot/cbuildbot.py ('K') | « buildbot/cbuildbot.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698