From f06c00fdb8e5addb7c68e09f93e2f2d7f6f127d0 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Wed, 14 Sep 2016 11:40:45 +0200 Subject: [PATCH] Fix Can't remove a slot from dynamips device Fix https://github.com/GNS3/gns3-gui/issues/1510 --- gns3server/compute/dynamips/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gns3server/compute/dynamips/__init__.py b/gns3server/compute/dynamips/__init__.py index 2e9d2d60..cb1ff330 100644 --- a/gns3server/compute/dynamips/__init__.py +++ b/gns3server/compute/dynamips/__init__.py @@ -520,7 +520,7 @@ class Dynamips(BaseManager): yield from vm.slot_add_binding(slot_id, adapter) except IndexError: raise DynamipsError("Slot {} doesn't exist on this router".format(slot_id)) - elif name.startswith("slot") and value is None: + elif name.startswith("slot") and (value is None or value is ""): slot_id = int(name[-1]) try: if vm.slots[slot_id]: @@ -538,7 +538,7 @@ class Dynamips(BaseManager): yield from vm.install_wic(wic_slot_id, wic) except IndexError: raise DynamipsError("WIC slot {} doesn't exist on this router".format(wic_slot_id)) - elif name.startswith("wic") and value is None: + elif name.startswith("wic") and (value is None or value is ""): wic_slot_id = int(name[-1]) try: if vm.slots[0].wics and vm.slots[0].wics[wic_slot_id]: