From: Guido van Rossum Date: Mon, 15 Jan 2001 16:32:49 +0000 (+0000) Subject: Default to passive mode. See SF bug #126851. X-Git-Tag: v2.1a1~267 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e6ccf3ab966c37f25c3c0e4da58c3b0bc7c5a1f6;p=thirdparty%2FPython%2Fcpython.git Default to passive mode. See SF bug #126851. This is slightly controversial, but after reading the argumentation in the bug tracker for and against, I believe this is the right solution. Let me know if it breaks for you, and how. --- diff --git a/Lib/ftplib.py b/Lib/ftplib.py index 5d0e260619ee..ebb4d159939c 100644 --- a/Lib/ftplib.py +++ b/Lib/ftplib.py @@ -113,7 +113,7 @@ class FTP: - port: port to connect to (integer, default previous port)''' if host: self.host = host if port: self.port = port - self.passiveserver = 0 + self.passiveserver = 1 self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.sock.connect((self.host, self.port)) self.file = self.sock.makefile('rb')