diff options
author | elie <elie> | 2015-06-06 08:40:05 +0000 |
---|---|---|
committer | elie <elie> | 2015-06-06 08:40:05 +0000 |
commit | 54bcd510d0a7e3e913e5962598fc2331dec545f8 (patch) | |
tree | a893f40669d73168bcd2f52b8c0fe74fcdacec8d | |
parent | 514b525f9baad5cff73116e0925659cebc36dab9 (diff) | |
download | pysnmp-54bcd510d0a7e3e913e5962598fc2331dec545f8.tar.gz |
removed RowStatus default value as it may collide with possible subclass
constraints
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | pysnmp/smi/mibs/SNMPv2-TC.py | 7 |
2 files changed, 5 insertions, 4 deletions
@@ -99,6 +99,8 @@ Revision 4.2.6 - MibBuilder now prepends the contents of environment variables it recognizes (PYSNMP_MIB_DIR, PYSNMP_MIB_DIRS, PYSNMP_MIB_PKGS) rather than using them instead of its default core MIBs. +- Removed RowStatus default value as it may collide with possible subclass + constraints. - Fix to authoritative engine side snmpEngineID discovery procedure: respond with notInTimeWindows rather then with unsupportedSecurityLevel at time synchronization phase. diff --git a/pysnmp/smi/mibs/SNMPv2-TC.py b/pysnmp/smi/mibs/SNMPv2-TC.py index 0dc0c37..f05b1bc 100644 --- a/pysnmp/smi/mibs/SNMPv2-TC.py +++ b/pysnmp/smi/mibs/SNMPv2-TC.py @@ -292,7 +292,6 @@ class RowStatus(Integer, TextualConvention): None, stNotExists ) } - defaultValue = stNotExists def setValue(self, value): value = self.clone(value) @@ -300,16 +299,16 @@ class RowStatus(Integer, TextualConvention): # Run through states transition matrix, # resolve new instance value excValue, newState = self.stateMatrix.get( - (value, self), + (value, self.hasValue() and self or self.stNotExists), (error.MibOperationError, None) ) newState = self.clone(newState) - debug.logger & debug.flagIns and debug.logger('RowStatus state change from %r to %s produced new state %r, error indication %r' % (self, value, newState, excValue)) + debug.logger & debug.flagIns and debug.logger('RowStatus state change from %r to %r produced new state %r, error indication %r' % (self, value, newState, excValue)) if excValue is not None: excValue = excValue( - msg='Exception at row state transition from %s to %s yields state %s and exception' % (self, value, newState), syntax=newState + msg='Exception at row state transition from %r to %r yields state %r and exception' % (self, value, newState), syntax=newState ) raise excValue |