summaryrefslogtreecommitdiff
path: root/Lib/ftplib.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-01-15 16:32:49 +0000
committerGuido van Rossum <guido@python.org>2001-01-15 16:32:49 +0000
commitda009999a550ae0743adf47c7940011ede3e8c40 (patch)
treea50d2369bd48dde5d192460ad091160d1ea983e3 /Lib/ftplib.py
parentab742818183b034a1b74613594dfc1b2dbd3ecc2 (diff)
downloadcpython-da009999a550ae0743adf47c7940011ede3e8c40.tar.gz
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.
Diffstat (limited to 'Lib/ftplib.py')
-rw-r--r--Lib/ftplib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/ftplib.py b/Lib/ftplib.py
index 5d0e260619..ebb4d15993 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')