[Twisted-Python] FTP server with credentials

Mayne, Peter peter.mayne at hp.com
Thu Oct 13 20:33:46 MDT 2005


> [mailto:twisted-python-bounces at twistedmatrix.com] On Behalf 
> Of Itamar Shtull-Trauring
> 
> Sounds like a bug; file it at http://twistedmatrix.com/bugs/, ideally
> with a failing unit test.

Done, issue 1275. (Curious; the message processor seems to remove spaces
from in front of digits.)

A (possibly final) question about my FTP server: I want to be able to
indicate to the client that a file upload failed. I can do this by
raising an exception from  unregisterProducer() in my FileConsumer
class, which causes the client to see "426 Transfer aborted." instead of
"226 Transfer Complete.", so the purpose is served. However, this seems
a bit too sledgehammer-like.

Is there a preferred way of passing a file transfer failure back to the
client? Overriding FTP.ftp_STOR() seems like a step in the right
direction, but the path between that and my own FileConsumer is not
entirely obvious to me. :-)

Thanks.

PJDM
-- 
Peter Mayne
Technology Consultant
Hewlett-Packard Australia
7-11 Barry Drive, Turner, ACT, 2612
 





More information about the Twisted-Python mailing list