Skip to content

Commit 5869a63

Browse files
committed
correct a fn return mismatch in types
1 parent 8c9bfb1 commit 5869a63

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

trepan/processor/cmdproc.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@
4646

4747
try:
4848
from trepan.lib.deparse import deparse_and_cache
49+
50+
have_deparse_and_cache = True
4951
except ImportError:
52+
have_deparse_and_cache = False
5053
pass
5154

5255
warned_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

0 commit comments

Comments
 (0)