mirror of
https://github.com/Textualize/rich.git
synced 2025-07-07 12:54:59 +00:00
Merge pull request #3692 from smacke/null-tb-offset-fix
fix for null tb_offset
This commit is contained in:
commit
fa9ce3ce70
1 changed files with 3 additions and 1 deletions
|
@ -178,7 +178,9 @@ def install(
|
|||
|
||||
# determine correct tb_offset
|
||||
compiled = tb_data.get("running_compiled_code", False)
|
||||
tb_offset = tb_data.get("tb_offset", 1 if compiled else 0)
|
||||
tb_offset = tb_data.get("tb_offset")
|
||||
if tb_offset is None:
|
||||
tb_offset = 1 if compiled else 0
|
||||
# remove ipython internal frames from trace with tb_offset
|
||||
for _ in range(tb_offset):
|
||||
if tb is None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue