File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4646
4747try :
4848 from trepan .lib .deparse import deparse_and_cache
49+
50+ have_deparse_and_cache = True
4951except ImportError :
52+ have_deparse_and_cache = False
5053 pass
5154
5255warned_file_mismatches = set ()
@@ -236,8 +239,7 @@ def print_location(proc_obj):
236239 tempdir = proc_obj .settings ("tempdir" ),
237240 )
238241 pyficache .remap_file (filename , remapped )
239- filename = remapped
240- lineno = pyficache .unmap_file_line (filename , lineno )
242+ filename , lineno = pyficache .unmap_file_line (filename , lineno )
241243 pass
242244 pass
243245 elif "<string>" == filename :
@@ -280,6 +282,7 @@ def print_location(proc_obj):
280282 not source_text
281283 and filename .startswith ("<string: " )
282284 and proc_obj .curframe .f_code
285+ and have_deparse_and_cache
283286 ):
284287 # Deparse the code object into a temp file and remap the line from code
285288 # into the corresponding line of the tempfile
You can’t perform that action at this time.
0 commit comments