Skip to content

Commit

Permalink
Revised to enforce ignoreErrors use.
Browse files Browse the repository at this point in the history
  • Loading branch information
lextm committed Aug 26, 2024
1 parent 895b55a commit 40e76ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pysnmp/hlapi/varbinds.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ def makeVarBinds(self, userCache: Dict[str, Any], varBinds):
else:
varBind = ObjectType(ObjectIdentity(varBind[0]), varBind[1])

resolvedVarBinds.append(varBind.resolveWithMib(mibViewController))
resolvedVarBinds.append(
varBind.resolveWithMib(mibViewController, ignoreErrors=False)
)

return resolvedVarBinds

Expand Down
2 changes: 1 addition & 1 deletion pysnmp/smi/rfc1902.py
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ class instance representing MIB browsing functionality.
Examples
--------
>>> from pysmi.hlapi.asyncio import varbinds
>>> mibViewController = varbinds.AbstractVarBinds.getMibViewController( engine )
>>> mibViewController = varbinds.MibViewControllerManager.getMibViewController(engine.cache)
>>> objectType = ObjectType(ObjectIdentity('SNMPv2-MIB', 'sysDescr'), 'Linux i386')
>>> objectType.resolveWithMib(mibViewController)
ObjectType(ObjectIdentity('SNMPv2-MIB', 'sysDescr'), DisplayString('Linux i386'))
Expand Down

0 comments on commit 40e76ed

Please sign in to comment.