mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-02 22:39:09 -07:00
Handle 'No more variables left in this MIB View ' in snmp_facts (#613)
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
This commit is contained in:
parent
7ac467a359
commit
d7aabcceed
2 changed files with 5 additions and 0 deletions
|
@ -173,6 +173,7 @@ from collections import defaultdict
|
|||
PYSNMP_IMP_ERR = None
|
||||
try:
|
||||
from pysnmp.entity.rfc3413.oneliner import cmdgen
|
||||
from pysnmp.proto.rfc1905 import EndOfMibView
|
||||
has_pysnmp = True
|
||||
except Exception:
|
||||
PYSNMP_IMP_ERR = traceback.format_exc()
|
||||
|
@ -393,6 +394,8 @@ def main():
|
|||
|
||||
for varBinds in varTable:
|
||||
for oid, val in varBinds:
|
||||
if isinstance(val, EndOfMibView):
|
||||
continue
|
||||
current_oid = oid.prettyPrint()
|
||||
current_val = val.prettyPrint()
|
||||
if v.ifIndex in current_oid:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue