1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-05 14:29:48 +00:00

oeqa/qemurunner: Fix AttributeError: QemuRunner instance has no attribute 'server_socket'

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.

(From OE-Core rev: 26fb69ec663afd05134822dc5e48fc8928ea5bf1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2015-07-27 22:15:57 +01:00
parent 7c71bc8a99
commit ae344c188d
+1 -1
View File
@@ -190,7 +190,7 @@ class QemuRunner:
logger.info("Sending SIGKILL to runqemu")
os.killpg(self.runqemu.pid, signal.SIGKILL)
self.runqemu = None
if self.server_socket:
if hasattr(self, 'server_socket') and self.server_socket:
self.server_socket.close()
self.server_socket = None
self.qemupid = None