Open kw1jjang opened 9 years ago
For unknown reason, the original code in ftplib.py works on my laptop now
def makepasv(self):
if self.af == socket.AF_INET:
host, port = parse227(self.sendcmd('PASV'))
else:
host, port = parse229(self.sendcmd('EPSV'), self.sock.getpeername())
return host, port
according to the link that Kang provided: "For the most part, sticking with AF_INET for socket programming over a network is the safest option. There is also AF_INET6 for Internet Protocol v6 addresses." I've checked that AF_INET6 does not work in our project, sticking with AF_INET is ok.
@ryankashi can you double check if this still persist on your computer?
Mine still needs the first if statement commented out. I just checked it
will research on this later
As we discussed, let's not worry about it at this point.
Ref: http://stackoverflow.com/questions/1593946/what-is-af-inet-and-why-do-i-need-it
We used an ad-hoc patch to get around of the issue (Ryan and Jiayuan experienced it), but we need to find a clean way to resolve the issue.