summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/targetcontrol.py
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:27:31 +0100
commit098d1a65e0192be1c7b816145fbeb41ed90ebf08 (patch)
tree00487cffec4daa9d2147701a362ea7d8399eb534 /meta/lib/oeqa/targetcontrol.py
parente075a77c1435ad776a8dfc2f66061b61191f7a29 (diff)
downloadpoky-098d1a65e0192be1c7b816145fbeb41ed90ebf08.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. (From OE-Core rev: ee707090848d793e3b2d82dd3861ae22222682c0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/targetcontrol.py')
-rw-r--r--meta/lib/oeqa/targetcontrol.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py
index 2aa548e1ad..7bbba6016b 100644
--- a/meta/lib/oeqa/targetcontrol.py
+++ b/meta/lib/oeqa/targetcontrol.py
@@ -182,7 +182,10 @@ class QemuTarget(BaseTarget):
182 return self.runner.is_alive() 182 return self.runner.is_alive()
183 183
184 def stop(self): 184 def stop(self):
185 self.runner.stop() 185 try:
186 self.runner.stop()
187 except:
188 pass
186 self.logger.removeHandler(self.loggerhandler) 189 self.logger.removeHandler(self.loggerhandler)
187 self.connection = None 190 self.connection = None
188 self.ip = None 191 self.ip = None