mirror of
https://git.yoctoproject.org/poky
synced 2026-06-11 16:30:23 +00:00
scripts: ensure tinfoil is shut down correctly
We should always shut down tinfoil when we're finished with it, either
by explicitly calling the shutdown() method or by using it as a
context manager ("with ...").
(From OE-Core rev: 5ec6d9ef309b841cdcbf1d14ac678d106d5d888a)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
f2854c67ce
commit
e616beba1c
@@ -30,9 +30,11 @@ def runqemu(args, config, basepath, workspace):
|
||||
"""Entry point for the devtool 'runqemu' subcommand"""
|
||||
|
||||
tinfoil = setup_tinfoil(config_only=True, basepath=basepath)
|
||||
machine = tinfoil.config_data.getVar('MACHINE', True)
|
||||
bindir_native = tinfoil.config_data.getVar('STAGING_BINDIR_NATIVE', True)
|
||||
tinfoil.shutdown()
|
||||
try:
|
||||
machine = tinfoil.config_data.getVar('MACHINE', True)
|
||||
bindir_native = tinfoil.config_data.getVar('STAGING_BINDIR_NATIVE', True)
|
||||
finally:
|
||||
tinfoil.shutdown()
|
||||
|
||||
if not glob.glob(os.path.join(bindir_native, 'qemu-system-*')):
|
||||
raise DevtoolError('QEMU is not available within this SDK')
|
||||
|
||||
Reference in New Issue
Block a user