summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-06-24 18:59:01 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-06-24 18:59:01 (GMT)
commit77f2d504c3891ff7f75d1e50d12b4cdb30e89767 (patch)
tree4855d5712882999df0326562e4ff18649c044416
parentb2bc6a93df64f4a0d3aef5514bf68fa1dd8d8724 (diff)
downloadcpython-77f2d504c3891ff7f75d1e50d12b4cdb30e89767.zip
cpython-77f2d504c3891ff7f75d1e50d12b4cdb30e89767.tar.gz
cpython-77f2d504c3891ff7f75d1e50d12b4cdb30e89767.tar.bz2
doctest systematically leaked memory when handling an exception in an
example (an obvious trackback cycle). Repaired. Bugfix candidate.
-rw-r--r--Lib/doctest.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/doctest.py b/Lib/doctest.py
index 08879dd..f83de6c 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)[-1]
state = OK
else: