diff options
author | elie <elie> | 2013-06-11 20:00:11 +0000 |
---|---|---|
committer | elie <elie> | 2013-06-11 20:00:11 +0000 |
commit | 955740eabfcf72e78c49b15c6b8786f09d8af4f4 (patch) | |
tree | aa2121be30d2630deacaf041fc76dcbc6ea99892 /pysnmp/smi | |
parent | 09960fa46cbb0b60371439e95d23973533b944e0 (diff) | |
download | pysnmp-955740eabfcf72e78c49b15c6b8786f09d8af4f4.tar.gz |
use format_exception()
Diffstat (limited to 'pysnmp/smi')
-rw-r--r-- | pysnmp/smi/instrum.py | 2 | ||||
-rw-r--r-- | pysnmp/smi/mibs/SNMPv2-SMI.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/pysnmp/smi/instrum.py b/pysnmp/smi/instrum.py index d80be7d..33254df 100644 --- a/pysnmp/smi/instrum.py +++ b/pysnmp/smi/instrum.py @@ -217,7 +217,7 @@ class MibInstrumController(AbstractMibInstrumController): rval = f(tuple(name), val, idx, acInfo) except error.SmiError: exc_t, exc_v, exc_tb = sys.exc_info() - debug.logger & debug.flagIns and debug.logger('flipFlopFsm: fun %s exception %s for %s=%r with traceback: %s' % (f, exc_t, name, val, traceback.format_exc(exc_tb))) + debug.logger & debug.flagIns and debug.logger('flipFlopFsm: fun %s exception %s for %s=%r with traceback: %s' % (f, exc_t, name, val, traceback.format_exception(exc_t, exc_v, exc_tb))) if origExc is None: # Take the first exception origExc, origTraceback = exc_v, exc_tb status = 'err' diff --git a/pysnmp/smi/mibs/SNMPv2-SMI.py b/pysnmp/smi/mibs/SNMPv2-SMI.py index ba1083c..e728e2b 100644 --- a/pysnmp/smi/mibs/SNMPv2-SMI.py +++ b/pysnmp/smi/mibs/SNMPv2-SMI.py @@ -534,7 +534,7 @@ class MibScalarInstance(MibTree): return self.syntax.clone(value) except PyAsn1Error: exc_t, exc_v, exc_tb = sys.exc_info() - debug.logger & debug.flagIns and debug.logger('setValue: %s=%r failed %s with traceback %s' % (self.name, value, exc_v, traceback.format_exc(exc_tb))) + debug.logger & debug.flagIns and debug.logger('setValue: %s=%r failed with traceback %s' % (self.name, value, traceback.format_exception(exc_t, exc_v, exc_tb))) if isinstance(exc_v, error.TableRowManagement): raise exc_v else: |