Merged revisions 71237-71238 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71237 | georg.brandl | 2009-04-05 16:24:52 +0200 (So, 05 Apr 2009) | 1 line

  #1326077: fix traceback formatting of SyntaxErrors.  This fixes two differences with formatting coming from Python: a) the reproduction of location details in the error message if no line text is given, b) the prefixing of the last line by one space.
........
  r71238 | georg.brandl | 2009-04-05 16:25:41 +0200 (So, 05 Apr 2009) | 1 line

  Add NEWS entry for r71237.
........
diff --git a/Lib/traceback.py b/Lib/traceback.py
index cb913ee..571ff57 100644
--- a/Lib/traceback.py
+++ b/Lib/traceback.py
@@ -63,7 +63,7 @@
         filename = co.co_filename
         name = co.co_name
         _print(file,
-               '  File "%s", line %d, in %s' % (filename,lineno,name))
+               '  File "%s", line %d, in %s' % (filename, lineno, name))
         linecache.checkcache(filename)
         line = linecache.getline(filename, lineno, f.f_globals)
         if line: _print(file, '    ' + line.strip())
@@ -159,9 +159,8 @@
             _print(file, 'Traceback (most recent call last):')
             print_tb(tb, limit, file)
         lines = format_exception_only(type(value), value)
-        for line in lines[:-1]:
-            _print(file, line, ' ')
-        _print(file, lines[-1], '')
+        for line in lines:
+            _print(file, line, '')
 
 def format_exception(etype, value, tb, limit=None, chain=True):
     """Format a stack trace and the exception information.