mirror of https://github.com/python/cpython
Fix the test so that connect() and bind() are called with a single
argument: a (host, port) tuple. Like multi-arg append(), multi-arg connect() and bind() may be ruled out!
This commit is contained in:
parent
5ba3c843db
commit
7e57bc4a5b
|
@ -97,7 +97,7 @@ try:
|
||||||
if not canfork or os.fork():
|
if not canfork or os.fork():
|
||||||
# parent is server
|
# parent is server
|
||||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
s.bind(hostname, PORT)
|
s.bind((hostname, PORT))
|
||||||
s.listen(1)
|
s.listen(1)
|
||||||
if verbose:
|
if verbose:
|
||||||
print 'parent accepting'
|
print 'parent accepting'
|
||||||
|
@ -133,7 +133,7 @@ try:
|
||||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
if verbose:
|
if verbose:
|
||||||
print 'child connecting'
|
print 'child connecting'
|
||||||
s.connect(hostname, PORT)
|
s.connect((hostname, PORT))
|
||||||
msg = 'socket test'
|
msg = 'socket test'
|
||||||
s.send(msg)
|
s.send(msg)
|
||||||
data = s.recv(1024)
|
data = s.recv(1024)
|
||||||
|
|
Loading…
Reference in New Issue