diff options
author | elie <elie> | 2015-07-06 21:14:19 +0000 |
---|---|---|
committer | elie <elie> | 2015-07-06 21:14:19 +0000 |
commit | fc6017d9f644e1590c5cb06e8eb7859210aa5ae0 (patch) | |
tree | 70a05e86b44ba10450c27dbd9015d8699ebcce0f | |
parent | 2f598fb4962cdd3b1bce5148581651654d78231e (diff) | |
download | pysnmp-fc6017d9f644e1590c5cb06e8eb7859210aa5ae0.tar.gz |
handle the case of ObjectIdentity initialization with ObjectIdentity instance
-rw-r--r-- | pysnmp/smi/rfc1902.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pysnmp/smi/rfc1902.py b/pysnmp/smi/rfc1902.py index 7fb1013..a8347a4 100644 --- a/pysnmp/smi/rfc1902.py +++ b/pysnmp/smi/rfc1902.py @@ -123,6 +123,9 @@ class ObjectIdentity: self.__indices = () + if isinstance(self.__args[0], ObjectIdentity): + self.__args[0].resolveWithMib(mibViewController) + 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) try: @@ -481,7 +484,7 @@ class NotificationType: if self.__additionalVarBinds: self.__varBinds.extend(self.__additionalVarBinds) self.__additionalVarBinds = [] - + self.__state |= self.stClean debug.logger & debug.flagMIB and debug.logger('resolved %r into %r' % (self.__objectIdentity, self.__varBinds)) |