summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils
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:38:36 +0000
commitf33fb239d60953aa3014bf694ab6d115054e5ab5 (patch)
tree8b4d8f16212f577df866179eb79f06ce9ec4d5ac /meta/lib/oeqa/utils
parent060c320e8a21f8a6e99ef4c8e0fad42041192304 (diff)
downloadpoky-f33fb239d60953aa3014bf694ab6d115054e5ab5.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 (From OE-Core rev: b9e0bf919e6fc1a58e02145a363ebe7066e5bf4f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils')
-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 f943034092..241d1eced8 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -378,6 +378,8 @@ class QemuRunner:
378 if self.runqemu.poll() is None: 378 if self.runqemu.poll() is None:
379 self.logger.debug("Sending SIGKILL to runqemu") 379 self.logger.debug("Sending SIGKILL to runqemu")
380 os.killpg(os.getpgid(self.runqemu.pid), signal.SIGKILL) 380 os.killpg(os.getpgid(self.runqemu.pid), signal.SIGKILL)
381 self.runqemu.stdin.close()
382 self.runqemu.stdout.close()
381 self.runqemu = None 383 self.runqemu = None
382 if hasattr(self, 'server_socket') and self.server_socket: 384 if hasattr(self, 'server_socket') and self.server_socket:
383 self.server_socket.close() 385 self.server_socket.close()