]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-36109: Fix random test_descr failure. (GH-12044)
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 26 Feb 2019 06:03:21 +0000 (08:03 +0200)
committerPablo Galindo <Pablogsal@gmail.com>
Tue, 26 Feb 2019 06:03:21 +0000 (22:03 -0800)
Lib/test/test_descr.py

index b38cb765cdc010987909eb17c0b798db8649ce2f..fc885c5e62f2520d130ebf1fd9a6b2cfb8ec2614 100644 (file)
@@ -4325,7 +4325,11 @@ order (MRO) for bases """
             def __hash__(self):
                 return hash('attr')
             def __eq__(self, other):
-                del C.attr
+                try:
+                    del C.attr
+                except AttributeError:
+                    # possible race condition
+                    pass
                 return 0
 
         class Descr(object):