Skip to content

Commit 05cc3b0

Browse files
We need BaseException to handle SystemExit case
1 parent 69a5030 commit 05cc3b0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/bdb.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,9 @@ def wrapper(self, *args):
100100
return sys.monitoring.DISABLE
101101
else:
102102
return ret
103-
except Exception:
103+
except BaseException:
104104
self.stop_trace()
105+
sys._getframe().f_back.f_trace = None
105106
raise
106107
finally:
107108
self._disable_current_event = False

0 commit comments

Comments
 (0)