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

Unified Diff: gclient.py

Issue 3418014: Remove the class StdoutAnnotated and clones the object instead. (Closed)
Patch Set: Created 10 years, 3 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
« no previous file with comments | « no previous file | gclient_utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient.py
diff --git a/gclient.py b/gclient.py
index 9eec5d8b73b0747098b3cea68e4c4b488a1d8300..d1b7e4a0ce47f579d17b970e4e2944a28e817a32 100644
--- a/gclient.py
+++ b/gclient.py
@@ -1170,6 +1170,10 @@ def Main(argv):
"""Doesn't parse the arguments here, just find the right subcommand to
execute."""
try:
+ # Make stdout auto-flush so buildbot doesn't kill us during lengthy
+ # operations. Python as a strong tendency to buffer sys.stdout.
+ sys.stdout = gclient_utils.MakeFileAutoFlush(sys.stdout)
+
# Do it late so all commands are listed.
CMDhelp.usage = ('\n\nCommands are:\n' + '\n'.join([
' %-10s %s' % (fn[3:], Command(fn[3:]).__doc__.split('\n')[0].strip())
@@ -1198,8 +1202,8 @@ def Main(argv):
options.entries_filename = options.config_filename + '_entries'
if options.jobs < 1:
parser.error('--jobs must be 1 or higher')
- # Always autoflush so buildbot doesn't kill us during lengthy operations.
- options.stdout = gclient_utils.StdoutAutoFlush(sys.stdout)
+ # TODO(maruel): Temporary, to be removed.
+ options.stdout = sys.stdout
# These hacks need to die.
if not hasattr(options, 'revisions'):
« no previous file with comments | « no previous file | gclient_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698