]> code.ossystems Code Review - openembedded-core.git/commit
oeqa/targetcontrol: Rework exception handling to avoid warnings
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 3 Jun 2020 08:29:55 +0000 (09:29 +0100)
committerSteve Sakoman <steve@sakoman.com>
Tue, 9 Jun 2020 15:39:30 +0000 (05:39 -1000)
commitbd2d32903f208b6a70abaa29b980db1498b84a02
treea35de8de51d645a6654a29796813f2c02791c750
parent5e33d1d1d655c50a817acda85f2df67c67196daf
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>
(cherry picked from commit ee707090848d793e3b2d82dd3861ae22222682c0)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/lib/oeqa/targetcontrol.py
meta/lib/oeqa/utils/commands.py