[Python-3000-checkins] r56497 - python/branches/p3yk/Lib/traceback.py

kurt.kaiser python-3000-checkins at python.org
Sun Jul 22 23:55:16 CEST 2007


Author: kurt.kaiser
Date: Sun Jul 22 23:55:16 2007
New Revision: 56497

Modified:
   python/branches/p3yk/Lib/traceback.py
Log:
In the case of syntax errors, in py3k format_exception_only()
was including line number and position in the final line of the
exception notification, duplicating info in previous lines.


Modified: python/branches/p3yk/Lib/traceback.py
==============================================================================
--- python/branches/p3yk/Lib/traceback.py	(original)
+++ python/branches/p3yk/Lib/traceback.py	Sun Jul 22 23:55:16 2007
@@ -193,8 +193,7 @@
                 # only three spaces to account for offset1 == pos 0
                 lines.append('   %s^\n' % ''.join(caretspace))
             value = msg
-
-    lines.append(_format_final_exc_line(stype, value))
+    lines.append("%s: %s" % (stype, str(msg)))
     return lines
 
 def _format_final_exc_line(etype, value):


More information about the Python-3000-checkins mailing list