mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +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
|
@ -115,7 +115,7 @@ class FTP:
|
|||
if port: self.port = port
|
||||
self.passiveserver = 0
|
||||
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
self.sock.connect(self.host, self.port)
|
||||
self.sock.connect((self.host, self.port))
|
||||
self.file = self.sock.makefile('rb')
|
||||
self.welcome = self.getresp()
|
||||
return self.welcome
|
||||
|
@ -265,7 +265,7 @@ class FTP:
|
|||
if self.passiveserver:
|
||||
host, port = parse227(self.sendcmd('PASV'))
|
||||
conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
conn.connect(host, port)
|
||||
conn.connect((host, port))
|
||||
resp = self.sendcmd(cmd)
|
||||
if resp[0] <> '1':
|
||||
raise error_reply, resp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue