[Python-checkins] cpython (merge default -> default): Merge.
stefan.krah
python-checkins at python.org
Fri Mar 23 16:38:24 CET 2012
http://hg.python.org/cpython/rev/60a84d86f1fa
changeset: 75908:60a84d86f1fa
parent: 75907:b81a1ef8949c
parent: 75905:dc0379b90364
user: Stefan Krah <skrah at bytereef.org>
date: Fri Mar 23 16:37:41 2012 +0100
summary:
Merge.
files:
Lib/test/test_asyncore.py | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/Lib/test/test_asyncore.py b/Lib/test/test_asyncore.py
--- a/Lib/test/test_asyncore.py
+++ b/Lib/test/test_asyncore.py
@@ -789,14 +789,18 @@
count=500))
t.start()
- for x in range(20):
- s = socket.socket(self.family, socket.SOCK_STREAM)
- s.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER,
- struct.pack('ii', 1, 0))
+
+ s = socket.socket(self.family, socket.SOCK_STREAM)
+ s.settimeout(.2)
+ s.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER,
+ struct.pack('ii', 1, 0))
+ try:
s.connect(server.address)
+ except socket.error:
+ pass
+ finally:
s.close()
-
class TestAPI_UseIPv4Sockets(BaseTestAPI):
family = socket.AF_INET
addr = (HOST, 0)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list