From 62ebe047e4c0c07dd5cc6956c2344af4f60578ff Mon Sep 17 00:00:00 2001 From: Thomas Wouters Date: Wed, 27 Jun 2001 15:07:17 +0000 Subject: [PATCH] Backport Tim's checkin 1.12: doctest systematically leaked memory when handling an exception in an example (an obvious trackback cycle). Repaired. --- Lib/doctest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/doctest.py b/Lib/doctest.py index 270e3087e752..c52a2955a7a0 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: -- 2.47.3