Compare commits
4 Commits
master
...
textual-co
Author | SHA1 | Date |
---|---|---|
Ilya Etingof | 3ca5bcc3cb | |
Ilya Etingof | 36feb0ea55 | |
Ilya Etingof | 5341a7b1ff | |
Ilya Etingof | ed5d607ec3 |
|
@ -6,6 +6,10 @@ 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()
|
||||
- TextualConvention is now a new-style class
|
||||
- Fixed crash when attempting to report unsupported request/notification
|
||||
PDU back to sender
|
||||
|
||||
Revision 4.3.4, released 2017-03-01
|
||||
-----------------------------------
|
||||
|
|
|
@ -361,8 +361,6 @@ class MsgAndPduDispatcher(object):
|
|||
|
||||
debug.logger & debug.flagDsp and debug.logger('receiveMessage: unhandled PDU type')
|
||||
|
||||
# XXX fails on unknown PDU
|
||||
|
||||
try:
|
||||
(destTransportDomain,
|
||||
destTransportAddress,
|
||||
|
@ -374,7 +372,7 @@ class MsgAndPduDispatcher(object):
|
|||
statusInformation
|
||||
)
|
||||
|
||||
except error.StatusInformation:
|
||||
except (error.StatusInformation, error.ProtocolError):
|
||||
debug.logger & debug.flagDsp and debug.logger(
|
||||
'receiveMessage: report failed, statusInformation %s' % sys.exc_info()[1])
|
||||
return restOfWholeMsg
|
||||
|
|
|
@ -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 = ''
|
||||
|
@ -184,7 +183,7 @@ class TextualConvention:
|
|||
return outputValue
|
||||
|
||||
for base in inspect.getmro(self.__class__):
|
||||
if base != self.__class__ and issubclass(base, Asn1Item):
|
||||
if not issubclass(base, TextualConvention) and issubclass(base, Asn1Item):
|
||||
return base.prettyOut(self, value)
|
||||
|
||||
raise SmiError('TEXTUAL-CONVENTION has no underlying SNMP base type')
|
||||
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue