From 64152c1af86152dfaffa8e855b3deeb5198ac316 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Thu, 26 Mar 2015 15:49:51 +0100 Subject: [PATCH] Fix a crash in CI, making log impossible to read --- gns3server/modules/iou/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gns3server/modules/iou/__init__.py b/gns3server/modules/iou/__init__.py index 3cdddfe7..7b80107a 100644 --- a/gns3server/modules/iou/__init__.py +++ b/gns3server/modules/iou/__init__.py @@ -49,9 +49,10 @@ class IOU(BaseManager): def close_vm(self, vm_id, *args, **kwargs): vm = self.get_vm(vm_id) - i = self._used_application_ids[vm_id] - self._free_application_ids.insert(0, i) - del self._used_application_ids[vm_id] + if vm_id in self._used_application_ids: + i = self._used_application_ids[vm_id] + self._free_application_ids.insert(0, i) + del self._used_application_ids[vm_id] yield from super().close_vm(vm_id, *args, **kwargs) return vm