summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_uuid.py
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2019-11-19 21:34:03 (GMT)
committerGitHub <noreply@github.com>2019-11-19 21:34:03 (GMT)
commit293dd23477eef6e7c1b1e26b5bb2c1e0d79ac3c2 (patch)
tree295b4eee204f0d1e4723e62825a86310ddc27578 /Lib/test/test_uuid.py
parentc6b20be85c0de6f2355c67ae6e7e578941275cc0 (diff)
downloadcpython-293dd23477eef6e7c1b1e26b5bb2c1e0d79ac3c2.zip
cpython-293dd23477eef6e7c1b1e26b5bb2c1e0d79ac3c2.tar.gz
cpython-293dd23477eef6e7c1b1e26b5bb2c1e0d79ac3c2.tar.bz2
Remove binding of captured exceptions when not used to reduce the chances of creating cycles (GH-17246)
Capturing exceptions into names can lead to reference cycles though the __traceback__ attribute of the exceptions in some obscure cases that have been reported previously and fixed individually. As these variables are not used anyway, we can remove the binding to reduce the chances of creating reference cycles. See for example GH-13135
Diffstat (limited to 'Lib/test/test_uuid.py')
-rw-r--r--Lib/test/test_uuid.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_uuid.py b/Lib/test/test_uuid.py
index ddf7e6d..b76c60e 100644
--- a/Lib/test/test_uuid.py
+++ b/Lib/test/test_uuid.py
@@ -471,7 +471,7 @@ class BaseTestUUID:
# the value from too_large_getter above.
try:
self.uuid.uuid1(node=node)
- except ValueError as e:
+ except ValueError:
self.fail('uuid1 was given an invalid node ID')
def test_uuid1(self):