Fix Bug when delete fake-running VMBox

Fix https://github.com/GNS3/gns3-gui/issues/1933
This commit is contained in:
Julien Duponchelle committed 2017-03-22 11:08:16 +01:00
1 parent 8712866489
commit cb78eb4ee3
1 file changed
+3 -1
@@ -1014,7 +1014,9 @@ class VirtualBoxVM(BaseNode):
if self.ubridge:
yield from self._ubridge_send("bridge delete {name}".format(name="VBOX-{}-{}".format(self._id, adapter_number)))
yield from self._control_vm("setlinkstate{} off".format(adapter_number + 1))
vm_state = yield from self._get_vm_state()
if vm_state == "running":
yield from self._control_vm("setlinkstate{} off".format(adapter_number + 1))
else:
vm_state = yield from self._get_vm_state()
if vm_state == "running":