bpo-36109: Fix random test_descr failure. (GH-12044)

This commit is contained in:
Serhiy Storchaka 2019-02-26 08:03:21 +02:00 committed by Pablo Galindo
parent b84df2d7cc
commit ff3d39faa8
1 changed files with 5 additions and 1 deletions

View 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):