Author giampaolo.rodola
Recipients giampaolo.rodola, gregory.p.smith, iElectric, janssen, jeffo, lgedgar, lszyba1, pitrou, qwavel, roberte, twhitema
Date 2009-10-16.18:43:15
SpamBayes Score 4.91274e-14
Marked as misclassified No
Message-id <>
> From a quick look at the patch, if you call login() twice, the socket
> will be wrapped twice as well? Perhaps auth_tls() should have a
> protection against this.

You're right. Done.

> In prot_p() and prot_c(), it seems that self._prot_p is updated
> unconditionally, regardless of the FTP response.

Both PROT P and PROT C commands expect a 2xx response.
That's why I used voidcmd(). If a response different than 2xx is 
received voidcmd() automatically raises an error_reply exception already 
and self._prot_p doesn't get set.

> One more question, why is "ssl_version=ssl.PROTOCOL_TLSv1" hardwired?

You're right, it shouldn't be.
This is now provided as a class attribute.
The reason I used PROTOCOL_TLSv1 instead of PROTOCOL_SSLv23 (the 
default) is because RFC-4217 recommends it.

> In retrbinary(), retrlines(), storbinary() and storlines(), you
> certainly want some try/finally blocks so that the data connection
> always gets closed at the end.

I agree, it's a good practice.
I avoided to do that because the original FTP class is coded like that.
Anyway, this is done too now.

Modified patch is in attachment.

I hope I'll be able to work on tests and documentation during this week-
Date User Action Args
2009-10-16 18:43:25giampaolo.rodolasetrecipients: + giampaolo.rodola, gregory.p.smith, janssen, pitrou, roberte, iElectric, lszyba1, twhitema, jeffo, qwavel, lgedgar
2009-10-16 18:43:25giampaolo.rodolasetmessageid: <>
2009-10-16 18:43:18giampaolo.rodolalinkissue2054 messages
2009-10-16 18:43:17giampaolo.rodolacreate