summaryrefslogtreecommitdiffstats
path: root/Lib/bdb.py
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2023-04-24 20:58:51 (GMT)
committerGitHub <noreply@github.com>2023-04-24 20:58:51 (GMT)
commit1c01f8d79760ca74f6d35b839d23ac408b3bb44e (patch)
tree063a9d5c424f015f313de485ece95b4a441d9b01 /Lib/bdb.py
parent518050ced18422fd00fadc1a81b0d942b98e2e5b (diff)
downloadcpython-1c01f8d79760ca74f6d35b839d23ac408b3bb44e.zip
cpython-1c01f8d79760ca74f6d35b839d23ac408b3bb44e.tar.gz
cpython-1c01f8d79760ca74f6d35b839d23ac408b3bb44e.tar.bz2
gh-101517: fix line number propagation in code generated for except* (#103550)
Diffstat (limited to 'Lib/bdb.py')
-rw-r--r--Lib/bdb.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/bdb.py b/Lib/bdb.py
index 7f9b095..0f3eec6 100644
--- a/Lib/bdb.py
+++ b/Lib/bdb.py
@@ -574,6 +574,8 @@ class Bdb:
line = linecache.getline(filename, lineno, frame.f_globals)
if line:
s += lprefix + line.strip()
+ else:
+ s += f'{lprefix}Warning: lineno is None'
return s
# The following methods can be called by clients to use