diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-27 22:15:57 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-27 23:29:15 +0100 |
commit | ae344c188d210faa549bf57d45ed2f6a37eb9319 (patch) | |
tree | 3c48c6b03e7832a98b0f9c245eb2d9ba3cbedc0a /meta/lib/oeqa/utils/qemurunner.py | |
parent | 7c71bc8a993370da109feb6e038521bfb8cc2a7e (diff) | |
download | poky-ae344c188d210faa549bf57d45ed2f6a37eb9319.tar.gz |
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>
Diffstat (limited to 'meta/lib/oeqa/utils/qemurunner.py')
-rw-r--r-- | meta/lib/oeqa/utils/qemurunner.py | 2 |
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: | |||
190 | logger.info("Sending SIGKILL to runqemu") | 190 | logger.info("Sending SIGKILL to runqemu") |
191 | os.killpg(self.runqemu.pid, signal.SIGKILL) | 191 | os.killpg(self.runqemu.pid, signal.SIGKILL) |
192 | self.runqemu = None | 192 | self.runqemu = None |
193 | if self.server_socket: | 193 | if hasattr(self, 'server_socket') and self.server_socket: |
194 | self.server_socket.close() | 194 | self.server_socket.close() |
195 | self.server_socket = None | 195 | self.server_socket = None |
196 | self.qemupid = None | 196 | self.qemupid = None |