Skip to contentSkip to conversation

knotty: Fix output buffering issues

PATCH New Richard Purdie 1 participant 1 message May 16, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 knotty: Fix output buffering issues

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.

bitbake/lib/bb/ui/knotty.py +2 -0
index d6813f5..9605c8e 100644
@@ -186,6 +186,7 @@ class TerminalFilter(object):
             lines = self.footer_present
             sys.stdout.buffer.write(self.curses.tparm(self.cuu, lines))
             sys.stdout.buffer.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:",