diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-09 09:58:01 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-10 11:09:58 -0700 |
commit | a7bc031f847c45b2d266cfbf8e203155ab0166b9 (patch) | |
tree | 2b0c9cf89d5917abb43cb760533a72ce296a3cc9 | |
parent | da6926bc6a17478bd38f0df176116b6552c124f6 (diff) | |
download | poky-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.py | 4 |
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 | |||
31 | import fcntl | 31 | import fcntl |
32 | import struct | 32 | import struct |
33 | import copy | 33 | import copy |
34 | import atexit | ||
34 | from bb.ui import uihelper | 35 | from bb.ui import uihelper |
35 | 36 | ||
36 | logger = logging.getLogger("BitBake") | 37 | logger = 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 |