Skip to content

Commit 5a28bfb

Browse files
committed
Change the sense of a test in how the profiler interprets exception events.
This should fix a bug in how time is allocated during exception propogation (esp. in the presence of finally clauses).
1 parent 30bff63 commit 5a28bfb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/profile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def trace_dispatch_l(self, frame, event, arg):
241241

242242
def trace_dispatch_exception(self, frame, t):
243243
rt, rtt, rct, rfn, rframe, rcur = self.cur
244-
if (not rframe is frame) and rcur:
244+
if (rframe is frame) and rcur:
245245
return self.trace_dispatch_return(rframe, t)
246246
return 0
247247

0 commit comments

Comments
 (0)