[Python-Dev] python/trunk/Lib/test/test_urllib.py (for ftpwrapper)

O.R.Senthil Kumaran orsenthil at users.sourceforge.net
Sun May 27 13:23:56 CEST 2007


* ocean <ocean at m2.ccsnet.ne.jp> [2007-05-26 13:50:40]:
> 
> http://mail.python.org/pipermail/python-checkins/2007-May/060507.html
> 
> Hello. I'm using Windows2000, I tried some investigation for
> test_ftpwrapper.
> 
> After I did this change, most errors were gone.
> 
> Index: Lib/urllib.py
> ===================================================================
> --- Lib/urllib.py (revision 55584)
> +++ Lib/urllib.py (working copy)
> @@ -833,7 +833,7 @@
>          self.busy = 0
>          self.ftp = ftplib.FTP()
>          self.ftp.connect(self.host, self.port, self.timeout)
> -        self.ftp.login(self.user, self.passwd)
> +#        self.ftp.login(self.user, self.passwd)
>          for dir in self.dirs:
>              self.ftp.cwd(dir)

The init function in urllib is called under cases when ftp retrive has failed
with one of ftp related errors. ( non-programmatic)
Under those cases, my assumption is we might require the ftp.login to be
present.
Are you sure, this change does not affect anyother places?

-- 
O.R.Senthil Kumaran
http://uthcode.sarovar.org


More information about the Python-Dev mailing list