gh-101517: fix line number propagation in code generated for except* (#103550)

This commit is contained in:
Irit Katriel 2023-04-24 14:58:51 -06:00 committed by GitHub
parent 518050ced1
commit 1c01f8d797
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 15 deletions

View file

@ -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