diff options
author | Giampaolo Rodola' <g.rodola@gmail.com> | 2012-03-23 15:07:07 +0100 |
---|---|---|
committer | Giampaolo Rodola' <g.rodola@gmail.com> | 2012-03-23 15:07:07 +0100 |
commit | 65116a2c2b4c164e41f7e2278a9152d4058618c0 (patch) | |
tree | ed7ee518c89fda4b3d733b64016a42797aa0cc1f /Lib/test/test_asyncore.py | |
parent | f84f102a23067e752b800f498f4260135094b679 (diff) | |
download | cpython-65116a2c2b4c164e41f7e2278a9152d4058618c0.tar.gz |
attempt to fix asyncore buildbot failure
Diffstat (limited to 'Lib/test/test_asyncore.py')
-rw-r--r-- | Lib/test/test_asyncore.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/test/test_asyncore.py b/Lib/test/test_asyncore.py index 507a8daa96..5f55df89f5 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 |