Author: Matti Picus <[email protected]>
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, ())
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to