summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-27 22:15:57 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-27 23:28:22 +0100
commit26fb69ec663afd05134822dc5e48fc8928ea5bf1 (patch)
tree9bb047611ef676ef33ca50e8b571ce1618385417 /meta
parent7216116c9552e812d8c75c0687223f9a84204a28 (diff)
downloadopenembedded-core-26fb69ec663afd05134822dc5e48fc8928ea5bf1.tar.gz
openembedded-core-26fb69ec663afd05134822dc5e48fc8928ea5bf1.tar.bz2
openembedded-core-26fb69ec663afd05134822dc5e48fc8928ea5bf1.zip
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 7f8331ad27..1cf8f7668c 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -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