diff options
author | Ilya Etingof <etingof@gmail.com> | 2017-03-18 14:17:23 +0100 |
---|---|---|
committer | Ilya Etingof <etingof@gmail.com> | 2017-03-18 14:17:23 +0100 |
commit | ed5d607ec3f5644067a527db9756772ad3f83c44 (patch) | |
tree | 04c90115c0488ba823d18d73ab4a2053196c9667 | |
parent | 010e34e40a8eaf142e8393eab6f29a467fe8fa92 (diff) | |
download | pysnmp-git-ed5d607ec3f5644067a527db9756772ad3f83c44.tar.gz |
fix to infinite recursion in TextualConvention.prettyIn()
Also, TextualConvention is now a new-style class
-rw-r--r-- | CHANGES.txt | 1 | ||||
-rw-r--r-- | pysnmp/smi/mibs/SNMPv2-TC.py | 5 |
2 files changed, 3 insertions, 3 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 392b5c26..bb1c8960 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,7 @@ Revision 4.3.5, released 2017-0X-XX now support ignoreNonIncreasingOid option. - Fix to accidentally reset error-status when building confirmed class SNMPv1 PDU +- Fix to possible infinite recursion in TextualConvention.prettyIn() Revision 4.3.4, released 2017-03-01 ----------------------------------- diff --git a/pysnmp/smi/mibs/SNMPv2-TC.py b/pysnmp/smi/mibs/SNMPv2-TC.py index 9df2f586..e4857b31 100644 --- a/pysnmp/smi/mibs/SNMPv2-TC.py +++ b/pysnmp/smi/mibs/SNMPv2-TC.py @@ -29,8 +29,7 @@ Counter32, Unsigned32, TimeTicks, Counter64 = mibBuilder.importSymbols( ) -# XXX keep this old-style class till pyasn1 types becomes new-style -class TextualConvention: +class TextualConvention(object): displayHint = '' status = 'current' description = '' @@ -200,7 +199,7 @@ class TextualConvention: input meaning `unicode` (Py2) or `str` (Py3). """ for base in inspect.getmro(self.__class__): - if base != self.__class__ and issubclass(base, Asn1Item): + if not issubclass(base, TextualConvention) and issubclass(base, Asn1Item): break else: raise SmiError('TEXTUAL-CONVENTION has no underlying SNMP base type') |