Commit 9ff100a
authored
Be more defensive in `get_source_context`.
The current check makes no sense as we first try to decrement
`tb_lineno` and then check the result against `None`:
```python
lineno = tb_lineno - 1
if lineno is not None and abs_path:
```
So it looks like this was an oversight/got broken at some point.
Closes #3924
1 parent 98d0415 commit 9ff100a
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
571 | 571 | | |
572 | 572 | | |
573 | 573 | | |
574 | | - | |
| 574 | + | |
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
| |||
587 | 587 | | |
588 | 588 | | |
589 | 589 | | |
590 | | - | |
591 | | - | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
592 | 593 | | |
593 | 594 | | |
594 | 595 | | |
| 596 | + | |
595 | 597 | | |
596 | 598 | | |
597 | 599 | | |
| |||
0 commit comments