From 0dce074828f7fd97eb09ac5d0ba7d4401b1e79a8 Mon Sep 17 00:00:00 2001 From: sizhky <1992chinna@gmail.com> Date: Sun, 8 Sep 2024 20:37:32 +0530 Subject: [PATCH] Update tracer.py --- pysnooper/tracer.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pysnooper/tracer.py b/pysnooper/tracer.py index e82826f..1b35154 100644 --- a/pysnooper/tracer.py +++ b/pysnooper/tracer.py @@ -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: