Verified Commit e1b801c4 authored by Dmitry Volodin's avatar Dmitry Volodin
Browse files

Fix

parent 3fbd4366
Pipeline #21878 passed with stages
in 15 minutes and 29 seconds
......@@ -75,7 +75,7 @@ def in_lookup(seq, model=None):
# check int
m = []
for l in seq[1]:
if type(l) in int or l.isdigit():
if isinstance(l, int) or l.isdigit():
m += [int(l)]
continue
if len(seq[1]) == 1:
......
......@@ -214,12 +214,12 @@ class Script(BaseScript):
except self.CLISyntaxError:
pass
def get_idprom(self, int, descr):
def get_idprom(self, iface, descr):
try:
t = self.cli("show idprom int %s | i Vendor" % int)
t = self.cli("show idprom int %s | i Vendor" % iface)
match = self.rx_idprom.search(t)
if not match and self.is_cat4000 and descr == "10GBASE-LR":
t = self.cli("show idprom int %s | i endor" % int)
t = self.cli("show idprom int %s | i endor" % iface)
match = self.rx_idprom1.search(t)
if match:
v = self.rx_cvend.search(match.group("t_vendor").upper())
......@@ -248,7 +248,7 @@ class Script(BaseScript):
if self.rx_trans.search(match.group("t_part_no").upper().replace("-", "")):
pid = self.get_transceiver_pid(match.group("t_part_no"))
else:
if "GBIC" in match.group("t_part_no") and "Gi" in int:
if "GBIC" in match.group("t_part_no") and "Gi" in iface:
pid = self.get_transceiver_pid(
"1000BASE" + match.group("t_part_no")[5:].strip()
)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment