mirror of
https://git.yoctoproject.org/poky
synced 2026-04-20 18:32:12 +02:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user