Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Vladimir
noc
Commits
ffba4528
Commit
ffba4528
authored
Dec 20, 2011
by
Dmitry Volodin
Browse files
NOC-245: Display error message on failed MIB lookup
parent
4499a66d
Changes
1
Hide whitespace changes
Inline
Side-by-side
fm/management/commands/lookup-mib.py
View file @
ffba4528
...
...
@@ -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
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment