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

Unified Diff: scripts/run_cmd.py

Issue 196133010: MOAR debugging: Print stdout,stderr line by line (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: Created 6 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/run_cmd.py
diff --git a/scripts/run_cmd.py b/scripts/run_cmd.py
index 88f5921eef2052638a0fc9f1be4aba2061c9f2c1..18182c55dcc0c939fb7754f4203cd1cb1aafb582 100755
--- a/scripts/run_cmd.py
+++ b/scripts/run_cmd.py
@@ -185,8 +185,9 @@ def _get_result(popen):
Returns:
A dictionary with stdout, stderr, and returncode as keys.
"""
- print popen.stdout.read()
- print popen.stderr.read()
+ for fd in (popen.stdout, popen.stderr):
+ for line in iter(fd.readline, ''):
+ print line
stdout, stderr = popen.communicate()
return CommandResults.make(stdout=stdout,
stderr=stderr,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698