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

Unified Diff: gclient_utils.py

Issue 3110030: Fix for files not ending with \n, otherwise the last line would be ignored. (Closed)
Patch Set: Created 10 years, 4 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: gclient_utils.py
diff --git a/gclient_utils.py b/gclient_utils.py
index 1efa036f6e99b970dea91e4d6d0c3b96e368e90f..8506321c3d79e003a7c05158715d6ed268871d48 100644
--- a/gclient_utils.py
+++ b/gclient_utils.py
@@ -317,6 +317,10 @@ def SubprocessCallAndFilter(command,
last_flushed_at = time.time()
sys.stdout.flush()
in_byte = kid.stdout.read(1)
+ # Flush the rest of buffered output. This is only an issue with files not
+ # ending with a \n.
+ if len(in_line) and filter_fn:
+ filter_fn(in_line)
rv = kid.wait()
if rv:
« 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