Kaydet (Commit) 7e57bc4a authored tarafından Guido van Rossum's avatar Guido van Rossum

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!
üst 5ba3c843
......@@ -97,7 +97,7 @@ try:
if not canfork or os.fork():
# parent is server
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind(hostname, PORT)
s.bind((hostname, PORT))
s.listen(1)
if verbose:
print 'parent accepting'
......@@ -133,7 +133,7 @@ try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
if verbose:
print 'child connecting'
s.connect(hostname, PORT)
s.connect((hostname, PORT))
msg = 'socket test'
s.send(msg)
data = s.recv(1024)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment