From bb080fa96a0866ea4946b20ab180d505c8dbe408 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Thu, 17 Sep 2015 15:46:06 +0200 Subject: [PATCH] Fix a crash when starting a VMware vm Fix #314 --- gns3server/modules/vmware/vmware_vm.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gns3server/modules/vmware/vmware_vm.py b/gns3server/modules/vmware/vmware_vm.py index 974b1e1b..203fe105 100644 --- a/gns3server/modules/vmware/vmware_vm.py +++ b/gns3server/modules/vmware/vmware_vm.py @@ -260,7 +260,7 @@ class VMwareVM(BaseVM): vnet = "ethernet{}.vnet".format(adapter_number) if vnet in self._vmx_pairs: vmnet = os.path.basename(self._vmx_pairs[vnet]) - if vmnet in self.manager.is_managed_vmnet(vmnet): + if self.manager.is_managed_vmnet(vmnet): # vmnet already managed, try to allocate a new one allocate_vmnet = True else: @@ -276,7 +276,7 @@ class VMwareVM(BaseVM): raise # mark the vmnet managed by us - if not vmnet in self._vmnets: + if vmnet not in self._vmnets: self._vmnets.append(vmnet) self._vmx_pairs["ethernet{}.vnet".format(adapter_number)] = vmnet else: @@ -810,7 +810,6 @@ class VMwareVM(BaseVM): nio=nio, adapter_number=adapter_number)) - @asyncio.coroutine def adapter_remove_nio_binding(self, adapter_number): """