summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-03 09:29:55 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-04 13:21:00 +0100
commitee707090848d793e3b2d82dd3861ae22222682c0 (patch)
treeb1154ea396a9a8ff291ceb75d6190df0e40e9308 /meta/lib/oeqa/utils
parent9bb2268677ac8f0c97433bf1f04555abe88028a9 (diff)
downloadopenembedded-core-contrib-ee707090848d793e3b2d82dd3861ae22222682c0.tar.gz
oeqa/targetcontrol: Rework exception handling to avoid warnings
We're seeing: WARNING: bitbake/lib/bb/cookerdata.py:136: ResourceWarning: unclosed file <_io.FileIO name='tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/testimage/qemurunner_log.20200601181912' mode='ab' closefd=True which can only be caused by the qemu.stop() method not being called. Tweak the error handling to fix the blanket exception handler which is likely meaning this function isn't getting called. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils')
-rw-r--r--meta/lib/oeqa/utils/commands.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py
index f1679875dc..df373c4169 100644
--- a/meta/lib/oeqa/utils/commands.py
+++ b/meta/lib/oeqa/utils/commands.py
@@ -351,10 +351,7 @@ def runqemu(pn, ssh=True, runqemuparams='', image_fstype=None, launch_cmd=None,
finally:
targetlogger.removeHandler(handler)
- try:
- qemu.stop()
- except:
- pass
+ qemu.stop()
def updateEnv(env_file):
"""