mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-18 20:37:57 +00:00
parent
45ca995dea
commit
55fed02299
@ -105,9 +105,10 @@ class VirtualBoxVM(BaseVM):
|
|||||||
|
|
||||||
results = yield from self.manager.execute("showvminfo", [self._vmname, "--machinereadable"])
|
results = yield from self.manager.execute("showvminfo", [self._vmname, "--machinereadable"])
|
||||||
for info in results:
|
for info in results:
|
||||||
name, value = info.split('=', 1)
|
if '=' in info:
|
||||||
if name == "VMState":
|
name, value = info.split('=', 1)
|
||||||
return value.strip('"')
|
if name == "VMState":
|
||||||
|
return value.strip('"')
|
||||||
raise VirtualBoxError("Could not get VM state for {}".format(self._vmname))
|
raise VirtualBoxError("Could not get VM state for {}".format(self._vmname))
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
|
Loading…
Reference in New Issue
Block a user