[Python-checkins] CVS: python/dist/src/Lib doctest.py,1.11,1.12

Tim Peters tim_one@users.sourceforge.net
Sun, 24 Jun 2001 11:59:03 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv30188/lib

Modified Files:
	doctest.py 
Log Message:
doctest systematically leaked memory when handling an exception in an
example (an obvious trackback cycle).  Repaired.
Bugfix candidate.


Index: doctest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/doctest.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** doctest.py	2001/06/24 06:46:58	1.11
--- doctest.py	2001/06/24 18:59:01	1.12
***************
*** 501,505 ****
                  # the traceback isn't necessary.
                  want = want.split('\n')[-2] + '\n'
!                 exc_type, exc_val, exc_tb = sys.exc_info()
                  got = traceback.format_exception_only(exc_type, exc_val)[-1]
                  state = OK
--- 501,505 ----
                  # the traceback isn't necessary.
                  want = want.split('\n')[-2] + '\n'
!                 exc_type, exc_val = sys.exc_info()[:2]
                  got = traceback.format_exception_only(exc_type, exc_val)[-1]
                  state = OK