diff options
| author | Michael E Brown <michael_e_brown@dell.com> | 2007-10-17 18:21:08 -0500 |
|---|---|---|
| committer | Michael E Brown <michael_e_brown@dell.com> | 2007-10-17 18:21:08 -0500 |
| commit | 4b07d5dc0bcdbd48140f5fb1412c2b55048c1889 (patch) | |
| tree | 5efb3e3a218f6bc060f61f043f402512b38fe80f /src | |
| parent | 8360c605a6b95a56f471404e581c242663c12062 (diff) | |
| download | mock-4b07d5dc0bcdbd48140f5fb1412c2b55048c1889.tar.gz mock-4b07d5dc0bcdbd48140f5fb1412c2b55048c1889.tar.xz mock-4b07d5dc0bcdbd48140f5fb1412c2b55048c1889.zip | |
make sure we properly catch all derived exceptions, like KeyboardInterrupt
Diffstat (limited to 'src')
| -rwxr-xr-x | src/py-libs/trace_decorator.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/py-libs/trace_decorator.py b/src/py-libs/trace_decorator.py index 9110020..0a8a31e 100755 --- a/src/py-libs/trace_decorator.py +++ b/src/py-libs/trace_decorator.py @@ -13,7 +13,7 @@ def trace(f, *args, **kw): result = "Bad exception raised: Exception was not a derived class of 'Exception'" try: result = f(*args, **kw) - except Exception, e: + except BaseException, e: result = "EXCEPTION RAISED" moduleLog.debug( "EXCEPTION: %s\n" % e, exc_info=1) raise @@ -36,7 +36,7 @@ def traceLog(logger = moduleLog): result = "Bad exception raised: Exception was not a derived class of 'Exception'" try: result = f(*args, **kw) - except Exception, e: + except BaseException, e: result = "EXCEPTION RAISED" l2.debug( "EXCEPTION: %s\n" % e, exc_info=1) raise |
