mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Fredrik Lundh:
This fixes a bunch of socket.connect(host, post) calls. Note that I haven't tested all modules -- I don't have enough servers here...
This commit is contained in:
parent
1916b35f58
commit
93a7c0fe6b
7 changed files with 9 additions and 9 deletions
|
@ -109,7 +109,7 @@ class HTTP:
|
|||
if not port: port = HTTP_PORT
|
||||
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
if self.debuglevel > 0: print 'connect:', (host, port)
|
||||
self.sock.connect(host, port)
|
||||
self.sock.connect((host, port))
|
||||
|
||||
def send(self, str):
|
||||
"""Send `str' to the server."""
|
||||
|
@ -209,7 +209,7 @@ if hasattr(socket, "ssl"):
|
|||
if not port: port = HTTPS_PORT
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
if self.debuglevel > 0: print 'connect:', (host, port)
|
||||
sock.connect(host, port)
|
||||
sock.connect((host, port))
|
||||
ssl = socket.ssl(sock, self.key_file, self.cert_file)
|
||||
self.sock = FakeSocket(sock, ssl)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue