Update tracer.py

This commit is contained in:
sizhky 2024-09-08 20:37:32 +05:30 committed by GitHub
parent f3d08deb9b
commit 0dce074828
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -80,6 +80,7 @@ def get_path_and_source_from_frame(frame):
try:
import linecache
_, _, source, _ = linecache.cache.get(file_name)
source = [line.rstrip() for line in source] # remove '\n' at the end
except Exception:
pass
elif ipython_filename_match: