Commit a77c944a authored by Jeremy Hylton's avatar Jeremy Hylton

Do not print caret when offset is None.

parent 99d61546
......@@ -175,13 +175,14 @@ def format_exception_only(etype, value):
while i < len(line) and line[i].isspace():
i = i+1
list.append(' %s\n' % line.strip())
s = ' '
for c in line[i:offset-1]:
if c.isspace():
s = s + c
else:
s = s + ' '
list.append('%s^\n' % s)
if offset is not None:
s = ' '
for c in line[i:offset-1]:
if c.isspace():
s = s + c
else:
s = s + ' '
list.append('%s^\n' % s)
value = msg
s = _some_str(value)
if s:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment