Commit ffba4528 authored by Dmitry Volodin's avatar Dmitry Volodin
Browse files

NOC-245: Display error message on failed MIB lookup

parent 4499a66d
......@@ -26,6 +26,10 @@ class Command(BaseCommand):
def lookup_mib(self, v):
if self.rx_oid.match(v):
# oid -> name
print MIB.get_name(v)
r = MIB.get_name(v)
else:
print MIB.get_oid(v)
r = MIB.get_oid(v)
if r:
print r
else:
raise CommandError("Not found: %s" % v)
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