mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-11-16 16:54:51 +02:00
Make the qemu event crash more future proof
This commit is contained in:
parent
90b0dfebbd
commit
feefb075d4
@ -734,7 +734,7 @@ class QemuVM(BaseVM):
|
|||||||
self.status = "stopped"
|
self.status = "stopped"
|
||||||
self._process = None
|
self._process = None
|
||||||
if returncode != 0:
|
if returncode != 0:
|
||||||
self.project.emit("log.error", "QEMU process has stopped, return code: {}\n{}".format(returncode, self.read_stdout()))
|
self.project.emit("log.error", {"message": "QEMU process has stopped, return code: {}\n{}".format(returncode, self.read_stdout())})
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def stop(self):
|
def stop(self):
|
||||||
|
@ -148,7 +148,7 @@ def test_termination_callback_error(vm, tmpdir):
|
|||||||
|
|
||||||
(action, event) = queue.get_nowait()
|
(action, event) = queue.get_nowait()
|
||||||
assert action == "log.error"
|
assert action == "log.error"
|
||||||
assert event == "QEMU process has stopped, return code: 1\nBOOMM"
|
assert event["message"] == "QEMU process has stopped, return code: 1\nBOOMM"
|
||||||
|
|
||||||
|
|
||||||
def test_reload(loop, vm):
|
def test_reload(loop, vm):
|
||||||
|
Loading…
Reference in New Issue
Block a user