From 8a73ad22abbff84099534f48ee8820fe34174d6f Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Fri, 16 Sep 2016 13:34:00 +0000 Subject: [PATCH] build.py: Now flushing stdout in make every now and then to avoid pipe filling up Signed-off-by: Jan Lindemann --- scripts/build.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/build.py b/scripts/build.py index ba3234b5..706aab35 100644 --- a/scripts/build.py +++ b/scripts/build.py @@ -100,10 +100,10 @@ def run_make(module, target): print(',---------- running ' + make_cmd + ' in ' + path + ' -------------------------- >') os.chdir(path) p = subprocess.Popen(make_cmd, shell=True, stdout=subprocess.PIPE) - p.wait() - for line in iter(p.stdout.readline,''): + for line in iter(p.stdout.readline, ''): sys.stdout.write('| ' + line) # avoid extra newlines from print() - sys.stdout.flush() + sys.stdout.flush() + p.wait() print('`---------- running ' + make_cmd + ' in ' + path + ' -------------------------- <') if p.returncode: print(make_cmd + ' failed')