diff options
author | elie <elie> | 2013-06-11 06:41:54 +0000 |
---|---|---|
committer | elie <elie> | 2013-06-11 06:41:54 +0000 |
commit | 09960fa46cbb0b60371439e95d23973533b944e0 (patch) | |
tree | d371fa79b72ee66d14c3dece0a0b7f41c038acf9 /pysnmp/smi | |
parent | d36c566fc007b5269bcf03097d5bb33056997f78 (diff) | |
download | pysnmp-09960fa46cbb0b60371439e95d23973533b944e0.tar.gz |
FSM exception handling reworked
Diffstat (limited to 'pysnmp/smi')
-rw-r--r-- | pysnmp/smi/instrum.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pysnmp/smi/instrum.py b/pysnmp/smi/instrum.py index 0c63661..d80be7d 100644 --- a/pysnmp/smi/instrum.py +++ b/pysnmp/smi/instrum.py @@ -216,10 +216,11 @@ class MibInstrumController(AbstractMibInstrumController): # on subscription 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))) if origExc is None: # Take the first exception - origExc, origTraceback = sys.exc_info()[1:3] + origExc, origTraceback = exc_v, exc_tb status = 'err' - debug.logger & debug.flagIns and debug.logger('flipFlopFsm: fun %s failed %s for %s=%r with traceback: %s' % (f, origExc, name, val, traceback.format_exc(origTraceback))) break else: debug.logger & debug.flagIns and debug.logger('flipFlopFsm: fun %s suceeded for %s=%r' % (f, name, val)) |