[pypy-commit] pypy default: catch errors in thread
mattip
noreply at buildbot.pypy.org
Sun Apr 20 07:55:53 CEST 2014
Author: Matti Picus <matti.picus at gmail.com>
Branch:
Changeset: r70794:b40fc1b7ce82
Date: 2014-04-20 08:55 +0300
http://bitbucket.org/pypy/pypy/changeset/b40fc1b7ce82/
Log: catch errors in thread
diff --git a/rpython/rlib/test/test_rsocket.py b/rpython/rlib/test/test_rsocket.py
--- a/rpython/rlib/test/test_rsocket.py
+++ b/rpython/rlib/test/test_rsocket.py
@@ -164,8 +164,12 @@
s2 = RSocket(AF_INET, SOCK_STREAM)
s2.settimeout(10.0) # test one side with timeouts so select is used, shouldn't affect test
def connecting():
- s2.connect(addr)
- lock.release()
+ try:
+ s2.connect(addr)
+ except:
+ s2.close()
+ finally:
+ lock.release()
lock = thread.allocate_lock()
lock.acquire()
thread.start_new_thread(connecting, ())
More information about the pypy-commit
mailing list