[Twisted-Python] FTP/VFS -- registerProducer error

Modeling my code off the FTP server example (http://twistedmatrix.com/trac/attachment/ticket/1579/ftp_server_example.py), I coded my own FTPRealm class to use an inmem vfs instead of the local filesystem.
I can browse and download data from it without issue, but anytime I attempt to upload a file, I get this error: File "twisted/protocols/ftp.py", line 421, in registerConsumer self._cons.registerProducer(self, True) exceptions.AttributeError: _FileToConsumerAdapter instance has no attribute 'registerProducer'
I'm setting up the avatar with the line: avatar = FileSystemToIFTPShellAdaptor(pathutils.FileSystem(inmem.FakeDirectory()))
Full code is available here: http://rafb.net/p/FgTbiP80.html
Any help would be greatly appreciated.

Quoting Kyle Johnson osmaker@gmail.com:
Modeling my code off the FTP server example (http://twistedmatrix.com/trac/attachment/ticket/1579/ftp_server_example.py), I coded my own FTPRealm class to use an inmem vfs instead of the local filesystem.
I can browse and download data from it without issue, but anytime I attempt to upload a file, I get this error: File "twisted/protocols/ftp.py", line 421, in registerConsumer self._cons.registerProducer(self, True) exceptions.AttributeError: _FileToConsumerAdapter instance has no attribute 'registerProducer'
I'm setting up the avatar with the line: avatar = FileSystemToIFTPShellAdaptor(pathutils.FileSystem(inmem.FakeDirectory()))
Full code is available here: http://rafb.net/p/FgTbiP80.html
Any help would be greatly appreciated.
I may be wrong, but this looks like a bug, and I fill one here:
http://twistedmatrix.com/trac/ticket/2735
participants (2)
-
Kyle Johnson
-
Thomas Hervé