[pypy-commit] pypy default: Remove warnings when tests finish: "'NoneType' object is not callable" in <bound method Lock.__del__
amauryfa
noreply at buildbot.pypy.org
Sun May 15 18:05:40 CEST 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch:
Changeset: r44180:0db1fb788c99
Date: 2011-05-15 18:10 +0200
http://bitbucket.org/pypy/pypy/changeset/0db1fb788c99/
Log: Remove warnings when tests finish: "'NoneType' object is not
callable" in <bound method Lock.__del__
diff --git a/pypy/module/thread/ll_thread.py b/pypy/module/thread/ll_thread.py
--- a/pypy/module/thread/ll_thread.py
+++ b/pypy/module/thread/ll_thread.py
@@ -114,6 +114,8 @@
c_thread_releaselock(self._lock)
def __del__(self):
+ if free_ll_lock is None: # happens when tests are shutting down
+ return
free_ll_lock(self._lock)
def __enter__(self):
More information about the pypy-commit
mailing list