mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-18 06:18:08 +00:00
fix warning that you are explicitly comparing literals
This commit is contained in:
parent
4bed19f20a
commit
f9ab4ffb96
@ -458,7 +458,7 @@ class Dynamips(BaseManager):
|
|||||||
await vm.slot_add_binding(slot_id, adapter)
|
await vm.slot_add_binding(slot_id, adapter)
|
||||||
except IndexError:
|
except IndexError:
|
||||||
raise DynamipsError("Slot {} doesn't exist on this router".format(slot_id))
|
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])
|
slot_id = int(name[-1])
|
||||||
try:
|
try:
|
||||||
if vm.slots[slot_id]:
|
if vm.slots[slot_id]:
|
||||||
@ -476,7 +476,7 @@ class Dynamips(BaseManager):
|
|||||||
await vm.install_wic(wic_slot_id, wic)
|
await vm.install_wic(wic_slot_id, wic)
|
||||||
except IndexError:
|
except IndexError:
|
||||||
raise DynamipsError("WIC slot {} doesn't exist on this router".format(wic_slot_id))
|
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])
|
wic_slot_id = int(name[-1])
|
||||||
try:
|
try:
|
||||||
if vm.slots[0].wics and vm.slots[0].wics[wic_slot_id]:
|
if vm.slots[0].wics and vm.slots[0].wics[wic_slot_id]:
|
||||||
|
Loading…
Reference in New Issue
Block a user