Kaydet (Commit) afb44f47 authored tarafından Georg Brandl's avatar Georg Brandl

Repair accidental NameError.

üst a2946a43
......@@ -179,13 +179,14 @@ def format_exception_only(etype, value):
return [_format_final_exc_line(stype, value)]
# It was a syntax error; show exactly where the problem was found.
lines = []
try:
msg, (filename, lineno, offset, badline) = value
except Exception:
pass
else:
filename = filename or "<string>"
lines = [(' File "%s", line %d\n' % (filename, lineno))]
lines.append(' File "%s", line %d\n' % (filename, lineno))
if badline is not None:
lines.append(' %s\n' % badline.strip())
if offset is not None:
......
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