diff options
author | Giampaolo Rodola' <g.rodola@gmail.com> | 2012-03-23 14:07:07 (GMT) |
---|---|---|
committer | Giampaolo Rodola' <g.rodola@gmail.com> | 2012-03-23 14:07:07 (GMT) |
commit | a3481e70d188edf846cac6244ddc7f1178c6ff50 (patch) | |
tree | 8f03a9d8936c5a2fd99c37695492cdb3aa524c8f /Lib | |
parent | c5d47d5ac3824f8b0788795897236ac02da0c954 (diff) | |
download | cpython-a3481e70d188edf846cac6244ddc7f1178c6ff50.zip cpython-a3481e70d188edf846cac6244ddc7f1178c6ff50.tar.gz cpython-a3481e70d188edf846cac6244ddc7f1178c6ff50.tar.bz2 |
attempt to fix asyncore buildbot failure
Diffstat (limited to 'Lib')
-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 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 |