summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-04-28 20:39:58 (GMT)
committerGuido van Rossum <guido@python.org>2000-04-28 20:39:58 (GMT)
commit6650320349185a9e2f06fba56a3bd3142fb6f8d5 (patch)
tree25bc98ce16d4b0b4cbe9a90a640ab5fff58b75b1
parent1cb6cd0ec5453d22d224d01ecd824ea9753232de (diff)
downloadcpython-6650320349185a9e2f06fba56a3bd3142fb6f8d5.zip
cpython-6650320349185a9e2f06fba56a3bd3142fb6f8d5.tar.gz
cpython-6650320349185a9e2f06fba56a3bd3142fb6f8d5.tar.bz2
Get rid of memory leak caused by assingning sys.exc_info() to a local.
Store sys.exc_info()[:2] instead.
-rw-r--r--Lib/test/test_unicode.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index 94b2a4f..45449ee 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -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'