diff --git a/.travis.yml b/.travis.yml index dadbe57c..6009954f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,4 +29,4 @@ notifications: # on_failure: always after_success: - - coveralls + - coveralls --base_dir gns3server diff --git a/gns3server/modules/vpcs/__init__.py b/gns3server/modules/vpcs/__init__.py index bae14fe1..f79e2b8d 100644 --- a/gns3server/modules/vpcs/__init__.py +++ b/gns3server/modules/vpcs/__init__.py @@ -52,7 +52,8 @@ class VPCS(BaseManager): vm = self.get_vm(vm_id) i = self._used_mac_ids[vm_id] self._free_mac_ids[vm.project.id].insert(0, i) - del self._used_mac_ids[vm_id] + if vm_id in self._used_mac_ids: + del self._used_mac_ids[vm_id] yield from super().close_vm(vm_id, *args, **kwargs) return vm