Make Traceback header conform to new traceback ("innermost last" ->

"most recent call last").
This commit is contained in:
Guido van Rossum 2000-12-27 19:12:58 +00:00
parent e0c182fb5f
commit 7dd06966cb
2 changed files with 2 additions and 2 deletions

View file

@ -864,7 +864,7 @@ def print_exception(type=None, value=None, tb=None, limit=None):
type, value, tb = sys.exc_info() type, value, tb = sys.exc_info()
import traceback import traceback
print print
print "<H3>Traceback (innermost last):</H3>" print "<H3>Traceback (most recent call last):</H3>"
list = traceback.format_tb(tb, limit) + \ list = traceback.format_tb(tb, limit) + \
traceback.format_exception_only(type, value) traceback.format_exception_only(type, value)
print "<PRE>%s<B>%s</B></PRE>" % ( print "<PRE>%s<B>%s</B></PRE>" % (

View file

@ -141,7 +141,7 @@ class InteractiveInterpreter:
del tblist[:1] del tblist[:1]
list = traceback.format_list(tblist) list = traceback.format_list(tblist)
if list: if list:
list.insert(0, "Traceback (innermost last):\n") list.insert(0, "Traceback (most recent call last):\n")
list[len(list):] = traceback.format_exception_only(type, value) list[len(list):] = traceback.format_exception_only(type, value)
finally: finally:
tblist = tb = None tblist = tb = None