summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lab/bpo_prelude.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lab/bpo_prelude.py b/lab/bpo_prelude.py
index cc86a84d..14a5fc66 100644
--- a/lab/bpo_prelude.py
+++ b/lab/bpo_prelude.py
@@ -4,7 +4,8 @@ def trace(frame, event, arg):
# The weird globals here is to avoid a NameError on shutdown...
if frame.f_code.co_filename == globals().get("__file__"):
lineno = frame.f_lineno
- print("{} {}: {}".format(event[:4], lineno, linecache.getline(__file__, lineno).rstrip()))
+ line = linecache.getline(__file__, lineno).rstrip()
+ print("{} {}: {}".format(event[:4], lineno, line))
return trace
print(sys.version)