diff options
author | Pablo Galindo Salgado <Pablogsal@gmail.com> | 2021-10-16 17:27:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-16 17:27:43 (GMT) |
commit | fe0d9e22a52a10c4cbe52254b51f2d4e74d83568 (patch) | |
tree | 164d8d69ef92ef996cf43c4f4ae8ffeafc3980f7 /Lib/traceback.py | |
parent | 5afa0a411243210a30526c7459a0ccff5cb88494 (diff) | |
download | cpython-fe0d9e22a52a10c4cbe52254b51f2d4e74d83568.zip cpython-fe0d9e22a52a10c4cbe52254b51f2d4e74d83568.tar.gz cpython-fe0d9e22a52a10c4cbe52254b51f2d4e74d83568.tar.bz2 |
bpo-45249: Fix caret location when end_offset is set to 0 (GH-28855)
Diffstat (limited to 'Lib/traceback.py')
-rw-r--r-- | Lib/traceback.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/traceback.py b/Lib/traceback.py index 3cb8e57..568f3ff 100644 --- a/Lib/traceback.py +++ b/Lib/traceback.py @@ -781,7 +781,7 @@ class TracebackException: if self.offset is not None: offset = self.offset - end_offset = self.end_offset if self.end_offset is not None else offset + end_offset = self.end_offset if self.end_offset not in {None, 0} else offset if offset == end_offset or end_offset == -1: end_offset = offset + 1 |