From f9ab4ffb9607fa2fc61da04210ddacbf3ecce991 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torstein=20Huseb=C3=B8?= Date: Thu, 2 Apr 2020 21:26:23 +0200 Subject: [PATCH] fix warning that you are explicitly comparing literals --- 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 a996d5f5..f4f1fd9f 100644 --- a/gns3server/compute/dynamips/__init__.py +++ b/gns3server/compute/dynamips/__init__.py @@ -458,7 +458,7 @@ class Dynamips(BaseManager): await 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 or value is ""): + elif name.startswith("slot") and (value is None or value == ""): slot_id = int(name[-1]) try: if vm.slots[slot_id]: @@ -476,7 +476,7 @@ class Dynamips(BaseManager): await 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 or value is ""): + elif name.startswith("wic") and (value is None or value == ""): wic_slot_id = int(name[-1]) try: if vm.slots[0].wics and vm.slots[0].wics[wic_slot_id]: