Cleanup of finalizer did not work properly

This commit is contained in:
Dave Halter
2019-05-22 00:26:27 +02:00
parent d44e7086d7
commit 9463c112df

View File

@@ -680,7 +680,7 @@ if not is_py3:
return
for finalizer in list(cls._registry):
try:
finalizer(None)
finalizer()
except Exception:
sys.excepthook(*sys.exc_info())
assert finalizer not in cls._registry