diff options
author | Ilya Etingof <etingof@gmail.com> | 2017-02-04 19:31:53 +0100 |
---|---|---|
committer | Ilya Etingof <etingof@gmail.com> | 2017-02-04 19:31:53 +0100 |
commit | fd237891ce46a4d779ba148fc35574bb65d8b9b6 (patch) | |
tree | 2ce25365871f63c0b80d67911fd10f3823438605 /pysnmp/smi/mibs | |
parent | 4fdba5575917df54b010288516aba1a65e55227c (diff) | |
download | pysnmp-git-fd237891ce46a4d779ba148fc35574bb65d8b9b6.tar.gz |
do not require dot in "d" spec of DISPLAY-HINT
Diffstat (limited to 'pysnmp/smi/mibs')
-rw-r--r-- | pysnmp/smi/mibs/SNMPv2-TC.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pysnmp/smi/mibs/SNMPv2-TC.py b/pysnmp/smi/mibs/SNMPv2-TC.py index cc6184a8..9df2f586 100644 --- a/pysnmp/smi/mibs/SNMPv2-TC.py +++ b/pysnmp/smi/mibs/SNMPv2-TC.py @@ -86,7 +86,7 @@ class TextualConvention: return ''.join(outputValue) else: raise SmiError( - 'Unsupported numeric type spec: %s' % displayHintType + 'Unsupported numeric type spec "%s" at %s' % (displayHintType, self.__class__.__name__) ) elif self.displayHint and self.__octetString.isSuperTypeOf(self): outputValue = '' @@ -222,7 +222,7 @@ class TextualConvention: raise SmiError( 'integer evaluation error: %s' % sys.exc_info()[1] ) - elif displayHintType == 'd' and '.' in value: + elif displayHintType == 'd': try: return base.prettyIn(self, int(float(value) * 10**int(decimalPrecision))) except Exception: @@ -250,7 +250,7 @@ class TextualConvention: return base.prettyIn(self, binValue) else: raise SmiError( - 'Unsupported numeric type spec: %s' % displayHintType + 'Unsupported numeric type spec "%s" at %s' % (displayHintType, self.__class__.__name__) ) elif self.displayHint and self.__octetString.isSuperTypeOf(self): |