summaryrefslogtreecommitdiff
path: root/Lib/traceback.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/traceback.py')
-rw-r--r--Lib/traceback.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/traceback.py b/Lib/traceback.py
index c7947f118b..901b99476a 100644
--- a/Lib/traceback.py
+++ b/Lib/traceback.py
@@ -633,7 +633,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