From a488c7d7bf107274d5d4eb35121645759d7cfe0c Mon Sep 17 00:00:00 2001 From: "maruel@chromium.org" Date: Sun, 22 Aug 2010 03:49:18 +0000 Subject: [PATCH] Fix for files not ending with \n, otherwise the last line would be ignored. TBR=bradnelson Review URL: http://codereview.chromium.org/3110030 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@57010 0039d316-1c4b-4281-b951-d872f2087c98 --- gclient_utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gclient_utils.py b/gclient_utils.py index 1efa036f6e..8506321c3d 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: