haxtibal / netsnmptable

A Python C Extension package to query SNMP tables and table subsets, complementing the original Net-SNMP Python Bindings.
Other
7 stars 0 forks source link

get_entries for non-table nodes should be handled more gracefully #2

Closed haxtibal closed 8 years ago

haxtibal commented 8 years ago

Example: If you accidentally do

table = session.table_from_mib('SNMP-TARGET-MIB::snmpTargetAddrEntry')

instead of

table = session.table_from_mib('SNMP-TARGET-MIB::snmpTargetAddrTable')

, Table.get_entries will loop forever. This should be handled more gracefully, either by giving error when calling table_from_mib, or by interrupting loop early in get_entries, or both.