summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2020-03-22 14:04:26 +0100
committerIlya Etingof <etingof@gmail.com>2020-03-22 14:04:26 +0100
commitc966a5d9561111974f4d799c27cabef9e250c7b8 (patch)
tree45e326529a1fef6b8ee88555df4758dddca37d06
parent72386bf7c2a270b1baffd99152e9f30363d28c6a (diff)
downloadpysnmp-git-c966a5d9561111974f4d799c27cabef9e250c7b8.tar.gz
Fix wrong `ObjectIdentity.resolveWithMib` signature
-rw-r--r--pysnmp/smi/rfc1902.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/pysnmp/smi/rfc1902.py b/pysnmp/smi/rfc1902.py
index 42ef8800..b7720cd9 100644
--- a/pysnmp/smi/rfc1902.py
+++ b/pysnmp/smi/rfc1902.py
@@ -303,7 +303,7 @@ class ObjectIdentity(object):
# this would eventually be called by an entity which posses a
# reference to MibViewController
- def resolveWithMib(self, mibViewController):
+ def resolveWithMib(self, mibViewController, ignoreErrors=True):
"""Perform MIB variable ID conversion.
Parameters
@@ -311,6 +311,12 @@ class ObjectIdentity(object):
mibViewController : :py:class:`~pysnmp.smi.view.MibViewController`
class instance representing MIB browsing functionality.
+ Other Parameters
+ ----------------
+ ignoreErrors: :py:class:`bool`
+ If `True` (default), ignore MIB object name casting
+ failures if possible.
+
Returns
-------
: :py:class:`~pysnmp.smi.rfc1902.ObjectIdentity`
@@ -383,7 +389,7 @@ class ObjectIdentity(object):
self.__indices = ()
if isinstance(self.__args[0], ObjectIdentity):
- self.__args[0].resolveWithMib(mibViewController)
+ self.__args[0].resolveWithMib(mibViewController, ignoreErrors=ignoreErrors)
if len(self.__args) == 1: # OID or label or MIB module
debug.logger & debug.flagMIB and debug.logger('resolving %s as OID or label' % self.__args)