Commit 66503203 authored by Guido van Rossum's avatar Guido van Rossum

Get rid of memory leak caused by assingning sys.exc_info() to a local.

Store sys.exc_info()[:2] instead.
parent 1cb6cd0e
......@@ -16,7 +16,7 @@ def test(method, input, output, *args):
value = apply(f, args)
except:
value = sys.exc_type
exc = sys.exc_info()
exc = sys.exc_info()[:2]
else:
exc = None
if value != output:
......@@ -24,7 +24,7 @@ def test(method, input, output, *args):
print 'no'
print '*',f, `input`, `output`, `value`
if exc:
print ' value == %s: %s' % (exc[:2])
print ' value == %s: %s' % (exc)
else:
if verbose:
print 'yes'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment