From: Georg Brandl Date: Mon, 24 Jul 2006 20:11:35 +0000 (+0000) Subject: Repair accidental NameError. X-Git-Tag: v2.5b3~176 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=afb44f47d9a90ce85ddfb23f91bedb9e1064b035;p=thirdparty%2FPython%2Fcpython.git Repair accidental NameError. --- diff --git a/Lib/traceback.py b/Lib/traceback.py index 24b9c68b84b2..f634159e8158 100644 --- a/Lib/traceback.py +++ b/Lib/traceback.py @@ -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 "" - 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: