]> granicus.if.org Git - python/commitdiff
doctest systematically leaked memory when handling an exception in an
authorTim Peters <tim.peters@gmail.com>
Sun, 24 Jun 2001 18:59:01 +0000 (18:59 +0000)
committerTim Peters <tim.peters@gmail.com>
Sun, 24 Jun 2001 18:59:01 +0000 (18:59 +0000)
example (an obvious trackback cycle).  Repaired.
Bugfix candidate.

Lib/doctest.py

index 08879dd9810899cd64df44b77b92912d1cd9d0d9..f83de6ca8f733eab5ed275c2baf79fcd92ae85a8 100644 (file)
@@ -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: