From ea605cd1526431380e4b15c2ea58dd81ff18a88d Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola' Date: Fri, 23 Mar 2012 15:04:27 +0100 Subject: [PATCH] attempt to fix asyncore buildbot failure --- Lib/test/test_asyncore.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_asyncore.py b/Lib/test/test_asyncore.py index f2fbc589c3..b8dfad279f 100644 --- a/Lib/test/test_asyncore.py +++ b/Lib/test/test_asyncore.py @@ -714,10 +714,15 @@ class BaseTestAPI(unittest.TestCase): for x in xrange(20): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + s.settimeout(.2) s.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, struct.pack('ii', 1, 0)) - s.connect(server.address) - s.close() + try: + s.connect(server.address) + except socket.error: + pass + finally: + s.close() class TestAPI_UseSelect(BaseTestAPI): -- 2.50.0