[Python-checkins] CVS: python/dist/src/Lib ftplib.py,1.47,1.48

Guido van Rossum python-dev@python.org
Mon, 15 Jan 2001 08:32:52 -0800


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv27379

Modified Files:
	ftplib.py 
Log Message:
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.


Index: ftplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ftplib.py,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -r1.47 -r1.48
*** ftplib.py	2001/01/14 23:36:06	1.47
--- ftplib.py	2001/01/15 16:32:49	1.48
***************
*** 114,118 ****
          if host: self.host = host
          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))
--- 114,118 ----
          if host: self.host = host
          if port: self.port = port
!         self.passiveserver = 1
          self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
          self.sock.connect((self.host, self.port))