More reliable _is_internal_frame

This commit is contained in:
Alex Hall 2019-05-05 16:57:43 +02:00 committed by Ram Rachum
parent baf5510814
commit ae17e3b724
1 changed files with 1 additions and 1 deletions

View File

@ -225,7 +225,7 @@ class Tracer:
self.target_frames.discard(calling_frame)
def _is_internal_frame(self, frame):
return frame.f_code.co_filename == __file__
return frame.f_code.co_filename == Tracer.__enter__.__code__.co_filename
def trace(self, frame, event, arg):