summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-09 09:58:01 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-10 11:09:58 -0700
commita7bc031f847c45b2d266cfbf8e203155ab0166b9 (patch)
tree2b0c9cf89d5917abb43cb760533a72ce296a3cc9
parentda6926bc6a17478bd38f0df176116b6552c124f6 (diff)
downloadpoky-a7bc031f847c45b2d266cfbf8e203155ab0166b9.tar.gz
bitbake: knotty: Deal with exceptions not resetting terminal configuration
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. (Bitbake rev: e1d89166f2dfe46412ff9a5610dd57b0cef74fe3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/ui/knotty.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py
index c1ee9f5269..3dada8eac6 100644
--- a/bitbake/lib/bb/ui/knotty.py
+++ b/bitbake/lib/bb/ui/knotty.py
@@ -31,6 +31,7 @@ import time
31import fcntl 31import fcntl
32import struct 32import struct
33import copy 33import copy
34import atexit
34from bb.ui import uihelper 35from bb.ui import uihelper
35 36
36logger = logging.getLogger("BitBake") 37logger = logging.getLogger("BitBake")
@@ -303,6 +304,7 @@ def main(server, eventHandler, params, tf = TerminalFilter):
303 taskfailures = [] 304 taskfailures = []
304 305
305 termfilter = tf(main, helper, console, format) 306 termfilter = tf(main, helper, console, format)
307 atexit.register(termfilter.finish)
306 308
307 while True: 309 while True:
308 try: 310 try:
@@ -536,6 +538,4 @@ def main(server, eventHandler, params, tf = TerminalFilter):
536 if return_value == 0: 538 if return_value == 0:
537 return_value = 1 539 return_value = 1
538 540
539 termfilter.finish()
540
541 return return_value 541 return return_value