summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2001-06-27 15:07:17 (GMT)
committerThomas Wouters <thomas@python.org>2001-06-27 15:07:17 (GMT)
commit62ebe047e4c0c07dd5cc6956c2344af4f60578ff (patch)
treee9d2916c55ab6bdeb62426fae123d25ff9fc5242
parentb24ffe47ae516d4620df3d7ce32d2108fc398d18 (diff)
downloadcpython-62ebe047e4c0c07dd5cc6956c2344af4f60578ff.zip
cpython-62ebe047e4c0c07dd5cc6956c2344af4f60578ff.tar.gz
cpython-62ebe047e4c0c07dd5cc6956c2344af4f60578ff.tar.bz2
Backport Tim's checkin 1.12:
doctest systematically leaked memory when handling an exception in an example (an obvious trackback cycle). Repaired.
-rw-r--r--Lib/doctest.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/doctest.py b/Lib/doctest.py
index 270e308..c52a295 100644
--- a/Lib/doctest.py
+++ b/Lib/doctest.py
@@ -500,7 +500,7 @@ def _run_examples_inner(out, fakeout, examples, globs, verbose, name):
# Only compare exception type and value - the rest of
# the traceback isn't necessary.
want = want.split('\n')[-2] + '\n'
- exc_type, exc_val, exc_tb = sys.exc_info()
+ exc_type, exc_val = sys.exc_info()[:2]
got = traceback.format_exception_only(exc_type, exc_val)[0]
state = OK
else: