diff --git a/Lib/profile.py b/Lib/profile.py index b58af1ea800..91679052b23 100755 --- a/Lib/profile.py +++ b/Lib/profile.py @@ -241,7 +241,7 @@ def trace_dispatch_l(self, frame, event, arg): def trace_dispatch_exception(self, frame, t): rt, rtt, rct, rfn, rframe, rcur = self.cur - if (rframe is frame) and rcur: + if (rframe is not frame) and rcur: return self.trace_dispatch_return(rframe, t) return 0