diff options
author | elie <elie> | 2013-06-10 14:25:47 +0000 |
---|---|---|
committer | elie <elie> | 2013-06-10 14:25:47 +0000 |
commit | afa02d47df56057273d502863cb05b93dfedf040 (patch) | |
tree | a4fbff54a5ba9da261bfcc8cdb239834535e2cc2 /pysnmp/smi | |
parent | 3725451e5af06e79cdf44b23b6282b59ffd2151a (diff) | |
download | pysnmp-afa02d47df56057273d502863cb05b93dfedf040.tar.gz |
exception re-raising improved at MibInstrumController.flipFlopFsm() so
that original traceback is preserved.
Diffstat (limited to 'pysnmp/smi')
-rw-r--r-- | pysnmp/smi/instrum.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pysnmp/smi/instrum.py b/pysnmp/smi/instrum.py index 1c07a02..a7605d4 100644 --- a/pysnmp/smi/instrum.py +++ b/pysnmp/smi/instrum.py @@ -215,10 +215,10 @@ class MibInstrumController(AbstractMibInstrumController): # on subscription rval = f(tuple(name), val, idx, acInfo) except error.SmiError: - debug.logger & debug.flagIns and debug.logger('flipFlopFsm: fun %s failed %s for %s=%r' % (f, sys.exc_info()[1], name, val)) if origExc is None: # Take the first exception origExc, origTraceback = sys.exc_info()[1:3] status = 'err' + debug.logger & debug.flagIns and debug.logger('flipFlopFsm: fun %s failed %s for %s=%r' % (f, origExc, name, val)) break else: debug.logger & debug.flagIns and debug.logger('flipFlopFsm: fun %s suceeded for %s=%r' % (f, name, val)) @@ -227,7 +227,7 @@ class MibInstrumController(AbstractMibInstrumController): idx = idx + 1 if origExc: if sys.version_info[0] <= 2: - raise origExc + raise origExc, None, origTraceback else: try: raise origExc.with_traceback(origTraceback) |