-
Notifications
You must be signed in to change notification settings - Fork 814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNMP new types support + bug fix #1318
Conversation
yannmh
commented
Jan 27, 2015
- Add Integer and Integer32 type support
- Change the SNMP get command logic to solve the 'Missing OID' issue
- Some PEP8 code cleaning
* Change the SNMP get command logic to solve the 'Missing OID' issue * Some PEP8 code cleaning
self.raise_on_error_indication(error_indication, instance) | ||
|
||
# Continue on error_status | ||
if error_status: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit odd.
You created a function to deal with error_indication
but you didn't with error_status
, while the logic looks quite the same (except that one is raising an error).
What I suggest is something like this:
if error_indication:
report_error_indication(error_indication, instance)
if error_status:
report_error_status(error_status, instance)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
report_error_indication
is raising an Exception and stops the check execution.
The reason why I didn't factorize report_error_status
is because it has a continue
(c.f your comment below) statement which refers directly to the upper level for
loop.
Looking good! |
SNMP new types support + bug fix