* [PATCH] oeqa/qemurunner: Fix AttributeError: QemuRunner instance has no attribute 'server_socket'
@ 2015-07-27 21:15 Richard Purdie
0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2015-07-27 21:15 UTC (permalink / raw)
To: openembedded-core
If start() returns False due to create_socker() failing, stop() may still get
called and currently this gives a track back since server_socket doesn't exist.
Avoid this.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 22bf91b..f81658f 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -174,7 +174,7 @@ class QemuRunner:
logging.info("Sending SIGKILL to runqemu")
os.killpg(self.runqemu.pid, signal.SIGKILL)
self.runqemu = None
- if self.server_socket:
+ if hasattr(self, 'server_socket'):
self.server_socket.close()
self.server_socket = None
self.qemupid = None
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-07-27 21:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-27 21:15 [PATCH] oeqa/qemurunner: Fix AttributeError: QemuRunner instance has no attribute 'server_socket' Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox