summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-03-23 21:23:30 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-03-23 21:23:30 (GMT)
commit3e6c335ae0a9d7dc9eaffe8c372571d098ccba39 (patch)
tree193050447ac18d397571a89f076ab7f95a414427
parent85e1478ca412f93e584046b44633283f6241df84 (diff)
downloadcpython-3e6c335ae0a9d7dc9eaffe8c372571d098ccba39.zip
cpython-3e6c335ae0a9d7dc9eaffe8c372571d098ccba39.tar.gz
cpython-3e6c335ae0a9d7dc9eaffe8c372571d098ccba39.tar.bz2
revert r70552; wrong fix
-rw-r--r--Lib/traceback.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/traceback.py b/Lib/traceback.py
index 381fb1f..3d877ee 100644
--- a/Lib/traceback.py
+++ b/Lib/traceback.py
@@ -149,7 +149,7 @@ def format_exception_only(etype, value):
"""Format the exception part of a traceback.
The arguments are the exception type and value such as given by
- sys.exc_info()[0] and sys.exc_info()[1]. The return value is a list of
+ sys.last_type and sys.last_value. The return value is a list of
strings, each ending in a newline.
Normally, the list contains a single string; however, for
@@ -239,12 +239,12 @@ def format_exc(limit=None):
def print_last(limit=None, file=None):
- """
- This is a shorthand for 'print_exception(*sys.exc_info(), limit, file)'.
- """
+ """This is a shorthand for 'print_exception(sys.last_type,
+ sys.last_value, sys.last_traceback, limit, file)'."""
if file is None:
file = sys.stderr
- print_exception(*(sys.exc_info() + (limit, file)))
+ print_exception(sys.last_type, sys.last_value, sys.last_traceback,
+ limit, file)
def print_stack(f=None, limit=None, file=None):