From a3481e70d188edf846cac6244ddc7f1178c6ff50 Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola' Date: Fri, 23 Mar 2012 15:07:07 +0100 Subject: attempt to fix asyncore buildbot failure --- Lib/test/test_asyncore.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Lib/test/test_asyncore.py b/Lib/test/test_asyncore.py index 507a8da..5f55df8 100644 --- a/Lib/test/test_asyncore.py +++ b/Lib/test/test_asyncore.py @@ -741,11 +741,15 @@ class BaseTestAPI(unittest.TestCase): for x in range(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): use_poll = False -- cgit v0.12