]> granicus.if.org Git - python/commitdiff
Default to passive mode. See SF bug #126851.
authorGuido van Rossum <guido@python.org>
Mon, 15 Jan 2001 16:32:49 +0000 (16:32 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 15 Jan 2001 16:32:49 +0000 (16:32 +0000)
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.

Lib/ftplib.py

index 5d0e260619ee9012b5c07f4111cc439a967b1411..ebb4d159939c4f8672e37a8ac12a33f8b60c472f 100644 (file)
@@ -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')