From fc6017d9f644e1590c5cb06e8eb7859210aa5ae0 Mon Sep 17 00:00:00 2001 From: elie Date: Mon, 6 Jul 2015 21:14:19 +0000 Subject: handle the case of ObjectIdentity initialization with ObjectIdentity instance --- pysnmp/smi/rfc1902.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)) -- cgit v1.2.1