summaryrefslogtreecommitdiff
path: root/pysnmp/smi/mibs/SNMPv2-TC.py
diff options
context:
space:
mode:
authorelie <elie>2015-06-06 08:40:05 +0000
committerelie <elie>2015-06-06 08:40:05 +0000
commit54bcd510d0a7e3e913e5962598fc2331dec545f8 (patch)
treea893f40669d73168bcd2f52b8c0fe74fcdacec8d /pysnmp/smi/mibs/SNMPv2-TC.py
parent514b525f9baad5cff73116e0925659cebc36dab9 (diff)
downloadpysnmp-54bcd510d0a7e3e913e5962598fc2331dec545f8.tar.gz
removed RowStatus default value as it may collide with possible subclass
constraints
Diffstat (limited to 'pysnmp/smi/mibs/SNMPv2-TC.py')
-rw-r--r--pysnmp/smi/mibs/SNMPv2-TC.py7
1 files changed, 3 insertions, 4 deletions
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