diff options
author | elie <elie> | 2011-01-23 12:34:58 +0000 |
---|---|---|
committer | elie <elie> | 2011-01-23 12:34:58 +0000 |
commit | af9e7c66d59ac5dd90cea706d4cc8368ad571cf7 (patch) | |
tree | 3d68f4ac2c7b94d0cdd1cd9af9c955081c37a770 | |
parent | 97e4fb6aca0ac7bf025fc831cdca46585be71038 (diff) | |
download | pysnmp-af9e7c66d59ac5dd90cea706d4cc8368ad571cf7.tar.gz |
snmpMsgSpec management re-arranged
-rw-r--r-- | pysnmp/proto/mpmod/base.py | 2 | ||||
-rw-r--r-- | pysnmp/proto/mpmod/rfc2576.py | 4 | ||||
-rw-r--r-- | pysnmp/proto/mpmod/rfc3412.py | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/pysnmp/proto/mpmod/base.py b/pysnmp/proto/mpmod/base.py index ff357f8..4975be7 100644 --- a/pysnmp/proto/mpmod/base.py +++ b/pysnmp/proto/mpmod/base.py @@ -6,7 +6,7 @@ class AbstractMessageProcessingModel: snmpMsgSpec = None __stateReference = __msgID = 0L def __init__(self): - self.snmpMsgSpec = self.snmpMsgSpec() # local copy + self._snmpMsgSpec = self.snmpMsgSpec() # local copy self.__msgIdIndex = {} self.__stateReferenceIndex = {} self.__sendPduHandleIdx = {} diff --git a/pysnmp/proto/mpmod/rfc2576.py b/pysnmp/proto/mpmod/rfc2576.py index c325827..496ea08 100644 --- a/pysnmp/proto/mpmod/rfc2576.py +++ b/pysnmp/proto/mpmod/rfc2576.py @@ -55,7 +55,7 @@ class SnmpV1MessageProcessingModel(AbstractMessageProcessingModel): # rfc3412: 7.1.6 scopedPDU = ( contextEngineId, contextName, pdu ) - msg = self.snmpMsgSpec + msg = self._snmpMsgSpec msg.setComponentByPosition(0, self.messageProcessingModelID) msg.setComponentByPosition(2) msg.getComponentByPosition(2).setComponentByType( @@ -219,7 +219,7 @@ class SnmpV1MessageProcessingModel(AbstractMessageProcessingModel): # rfc3412: 7.2.2 try: msg, restOfwholeMsg = decoder.decode( - wholeMsg, asn1Spec=self.snmpMsgSpec + wholeMsg, asn1Spec=self._snmpMsgSpec ) except PyAsn1Error: snmpInASNParseErrs, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMPv2-MIB', 'snmpInASNParseErrs') diff --git a/pysnmp/proto/mpmod/rfc3412.py b/pysnmp/proto/mpmod/rfc3412.py index eb492b8..81a5232 100644 --- a/pysnmp/proto/mpmod/rfc3412.py +++ b/pysnmp/proto/mpmod/rfc3412.py @@ -130,7 +130,7 @@ class SnmpV3MessageProcessingModel(AbstractMessageProcessingModel): ) # 7.1.7 - msg = self.snmpMsgSpec + msg = self._snmpMsgSpec # 7.1.7a msg.setComponentByPosition( @@ -360,7 +360,7 @@ class SnmpV3MessageProcessingModel(AbstractMessageProcessingModel): ) # 7.1.7 - msg = self.snmpMsgSpec + msg = self._snmpMsgSpec # 7.1.7a msg.setComponentByPosition( @@ -455,7 +455,7 @@ class SnmpV3MessageProcessingModel(AbstractMessageProcessingModel): # 7.2.2 try: msg, restOfwholeMsg = decoder.decode( - wholeMsg, asn1Spec=self.snmpMsgSpec + wholeMsg, asn1Spec=self._snmpMsgSpec ) except PyAsn1Error: snmpInASNParseErrs, = snmpEngine.msgAndPduDsp.mibInstrumController.mibBuilder.importSymbols('__SNMPv2-MIB', 'snmpInASNParseErrs') |