* knotty: Deal with exceptions not resetting terminal configuration
@ 2014-03-09 16:58 Richard Purdie
0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2014-03-09 16:58 UTC (permalink / raw)
To: bitbake-devel
When an exception occurred, the terminal parameters (such as echo)
may not be reset correctly. This change ensures they do get
atexit time in all cases, avoiding the terminal corruption issues
that could sometimes occur.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index c1ee9f52..3dada8e 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -31,6 +31,7 @@ import time
import fcntl
import struct
import copy
+import atexit
from bb.ui import uihelper
logger = logging.getLogger("BitBake")
@@ -303,6 +304,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
taskfailures = []
termfilter = tf(main, helper, console, format)
+ atexit.register(termfilter.finish)
while True:
try:
@@ -536,6 +538,4 @@ def main(server, eventHandler, params, tf = TerminalFilter):
if return_value == 0:
return_value = 1
- termfilter.finish()
-
return return_value
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-03-09 16:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-09 16:58 knotty: Deal with exceptions not resetting terminal configuration Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox