summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/runqemu.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-08-05 15:48:00 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-03 23:45:54 +0100
commite616beba1c85e31246d1c798191b194d168b3489 (patch)
tree5b9d19e7c4a7caeb72f1bb9da4a2b221cfb1da96 /scripts/lib/devtool/runqemu.py
parentf2854c67ce963211f27223bd1194420621694bc2 (diff)
downloadpoky-e616beba1c85e31246d1c798191b194d168b3489.tar.gz
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>
Diffstat (limited to 'scripts/lib/devtool/runqemu.py')
-rw-r--r--scripts/lib/devtool/runqemu.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/lib/devtool/runqemu.py b/scripts/lib/devtool/runqemu.py
index daee7fbbe3..303abcae4f 100644
--- a/scripts/lib/devtool/runqemu.py
+++ b/scripts/lib/devtool/runqemu.py
@@ -30,9 +30,11 @@ def runqemu(args, config, basepath, workspace):
30 """Entry point for the devtool 'runqemu' subcommand""" 30 """Entry point for the devtool 'runqemu' subcommand"""
31 31
32 tinfoil = setup_tinfoil(config_only=True, basepath=basepath) 32 tinfoil = setup_tinfoil(config_only=True, basepath=basepath)
33 machine = tinfoil.config_data.getVar('MACHINE', True) 33 try:
34 bindir_native = tinfoil.config_data.getVar('STAGING_BINDIR_NATIVE', True) 34 machine = tinfoil.config_data.getVar('MACHINE', True)
35 tinfoil.shutdown() 35 bindir_native = tinfoil.config_data.getVar('STAGING_BINDIR_NATIVE', True)
36 finally:
37 tinfoil.shutdown()
36 38
37 if not glob.glob(os.path.join(bindir_native, 'qemu-system-*')): 39 if not glob.glob(os.path.join(bindir_native, 'qemu-system-*')):
38 raise DevtoolError('QEMU is not available within this SDK') 40 raise DevtoolError('QEMU is not available within this SDK')