]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
knotty: Fix output buffering issues
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 May 2016 21:52:00 +0000 (22:52 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 17 May 2016 13:42:56 +0000 (14:42 +0100)
We need to flush the footer removal, else it may not be outputted until
the buffer is flushed as part of StreamHandler and this would lead to
it removing the ERROR output just printed which is extremely confusing.

Also ensure the footer is cleared before printing a summary as in
some cases it wasn't being removed, also leading to user confusion.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/ui/knotty.py

index 85a71f45ec5add7226dad6b037ccaedd8831a9d1..08c872e39771381ff231cd47d7f348e1ed576e8a 100644 (file)
@@ -186,6 +186,7 @@ class TerminalFilter(object):
             lines = self.footer_present
             sys.stdout.write(self.curses.tparm(self.cuu, lines))
             sys.stdout.write(self.curses.tparm(self.ed))
+            sys.stdout.flush()
         self.footer_present = False
 
     def updateFooter(self):
@@ -568,6 +569,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
             main.shutdown = 2
             return_value = 1
     try:
+        termfilter.clearFooter()
         summary = ""
         if taskfailures:
             summary += pluralise("\nSummary: %s task failed:",