Add PySnmpError.cause attribute
To convey parent exception information on re-raisepull/186/head
parent
6559ebe1ea
commit
cf68c25ca8
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
Revision 5.0.0, released 2018-07-??
|
Revision 5.0.0, released 2018-09-??
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
- SNMPv3 crypto operations that require external dependencies
|
- SNMPv3 crypto operations that require external dependencies
|
||||||
|
@ -27,9 +27,10 @@ Revision 5.0.0, released 2018-07-??
|
||||||
methods. The goal is to let MIB objects access/modify whatever
|
methods. The goal is to let MIB objects access/modify whatever
|
||||||
custom Python objects they need while being called back.
|
custom Python objects they need while being called back.
|
||||||
|
|
||||||
Revision 4.4.5, released 2018-07-XX
|
Revision 4.4.5, released 2018-08-XX
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
|
- Added PySnmpError.cause attribute holding parent exception tuple
|
||||||
- Fixed zero SNMPv3 boots/time values put in SNMPv3 TRAP messages
|
- Fixed zero SNMPv3 boots/time values put in SNMPv3 TRAP messages
|
||||||
- Fixed broken InetAddressType rendering caused by a pyasn1 regression
|
- Fixed broken InetAddressType rendering caused by a pyasn1 regression
|
||||||
- Fixed typo in RFC1158 module
|
- Fixed typo in RFC1158 module
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
# License: http://snmplabs.com/pysnmp/license.html
|
# License: http://snmplabs.com/pysnmp/license.html
|
||||||
#
|
#
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
class PySnmpError(Exception):
|
class PySnmpError(Exception):
|
||||||
pass
|
def __init__(self, message):
|
||||||
|
self.cause = sys.exc_info()
|
||||||
|
Exception.__init__(self, '%s, caused by %s: %s' % (message, self.cause[0], self.cause[1]))
|
||||||
|
|
Loading…
Reference in New Issue