[Python-checkins] r50808 - python/trunk/Lib/traceback.py

georg.brandl python-checkins at python.org
Mon Jul 24 22:11:36 CEST 2006


Author: georg.brandl
Date: Mon Jul 24 22:11:35 2006
New Revision: 50808

Modified:
   python/trunk/Lib/traceback.py
Log:
Repair accidental NameError.



Modified: python/trunk/Lib/traceback.py
==============================================================================
--- python/trunk/Lib/traceback.py	(original)
+++ python/trunk/Lib/traceback.py	Mon Jul 24 22:11:35 2006
@@ -179,13 +179,14 @@
         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:


More information about the Python-checkins mailing list