mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Do not print caret when offset is None.
This commit is contained in:
parent
6783070ebf
commit
ed9d0ba482
1 changed files with 8 additions and 7 deletions
|
@ -175,6 +175,7 @@ def format_exception_only(etype, value):
|
|||
while i < len(line) and line[i].isspace():
|
||||
i = i+1
|
||||
list.append(' %s\n' % line.strip())
|
||||
if offset is not None:
|
||||
s = ' '
|
||||
for c in line[i:offset-1]:
|
||||
if c.isspace():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue