aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-28 11:18:30 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-01 11:37:49 +0000
commitb9e0bf919e6fc1a58e02145a363ebe7066e5bf4f (patch)
tree7293d4aac9cddec3662ae6a2a600f7c63dbfceb6 /meta/lib
parent36a018e245a232f520ff946f152cc875927a6fb4 (diff)
downloadopenembedded-core-contrib-b9e0bf919e6fc1a58e02145a363ebe7066e5bf4f.tar.gz
oeqa/utils/qemurunner: Fix python ResourceWarning for unclosed file
Fixes: Stderr: /media/build1/poky/meta/lib/oeqa/utils/qemurunner.py:381: ResourceWarning: unclosed file <_io.BufferedWriter name=16> self.runqemu = None Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index f9430340925..241d1eced88 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -378,6 +378,8 @@ class QemuRunner:
if self.runqemu.poll() is None:
self.logger.debug("Sending SIGKILL to runqemu")
os.killpg(os.getpgid(self.runqemu.pid), signal.SIGKILL)
+ self.runqemu.stdin.close()
+ self.runqemu.stdout.close()
self.runqemu = None
if hasattr(self, 'server_socket') and self.server_socket:
self.server_socket.close()