[pypy-svn] pypy default: Remove warning messages at the end of some tests,
amauryfa
commits-noreply at bitbucket.org
Sun Feb 27 22:42:55 CET 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch:
Changeset: r42323:573706bcbe9e
Date: 2011-02-27 21:45 +0100
http://bitbucket.org/pypy/pypy/changeset/573706bcbe9e/
Log: Remove warning messages at the end of some tests, when
LowLevelType.__eq__ always raises because some globals are reset to
None.
diff --git a/pypy/rpython/lltypesystem/lltype.py b/pypy/rpython/lltypesystem/lltype.py
--- a/pypy/rpython/lltypesystem/lltype.py
+++ b/pypy/rpython/lltypesystem/lltype.py
@@ -21,6 +21,10 @@
weakref.WeakValueDictionary.__init__(self, *args, **kwargs)
remove_base = self._remove
def remove(*args):
+ if safe_equal is None:
+ # The interpreter is shutting down, and the comparison
+ # function is already gone.
+ return
if TLS is None: # Happens when the interpreter is shutting down
return remove_base(*args)
nested_hash_level = TLS.nested_hash_level
More information about the Pypy-commit
mailing list