Verified Commit f57436d2 authored by Andrey Vertiprahov's avatar Andrey Vertiprahov
Browse files

Alstec.24xx.get_interfaces. Catch not supported 'show port description' command.

parent a840e1ac
......@@ -69,7 +69,11 @@ class Script(BaseScript):
:return:
"""
for ifname in list(sorted(interfaces, reverse=True, key=alnum_key))[:3]:
v = self.cli("show port description %s" % ifname)
try:
v = self.cli("show port description %s" % ifname)
except self.CLISyntaxError:
self.logger.error("'show port description' is not supported")
break
if not v:
continue
r = parse_kv(self.description_map, v, sep=".")
......
Markdown is supported
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