Message377129
I think this was fixed by now:
I changed the script to print the result:
******************************************
import inspect, sys
# /etc/hostname is one line, but our source has multiple lines
code = compile('\n\n\n1/0', '/etc/hostname', 'exec')
try:
exec(code, {})
except Exception:
tb = sys.exc_info()[2]
else:
assert False, "unreachable, exec should always raise exception"
# this fails with an IndexError
print(inspect.getinnerframes(tb))
******************************************
and I got this output:
C:\Users\User\src\cpython>python.bat x.py
Running Release|Win32 interpreter...
[FrameInfo(frame=<frame at 0x01140DF0, file 'C:\\Users\\User\\src\\cpython\\x.py', line 14, code <module>>, filename='C:\\Users\\User\\src\\cpython\\x.py', lineno=7, function='<module>', code_context=[' exec(code, {})\n'], index=0), FrameInfo(frame=<frame at 0x011CA758, file '/etc/hostname', line 4, code <module>>, filename='/etc/hostname', lineno=4, function='<module>', code_context=None, index=None)] |
|
Date |
User |
Action |
Args |
2020-09-18 17:30:36 | iritkatriel | set | recipients:
+ iritkatriel, acapnotic, nailor |
2020-09-18 17:30:36 | iritkatriel | set | messageid: <1600450236.64.0.563814925448.issue15128@roundup.psfhosted.org> |
2020-09-18 17:30:36 | iritkatriel | link | issue15128 messages |
2020-09-18 17:30:36 | iritkatriel | create | |
|