[Twisted-Python] Serializing cftp and ssh sessions
exarkun at twistedmatrix.com
exarkun at twistedmatrix.com
Sun Oct 19 14:44:19 MDT 2014
On 17 Oct, 08:50 am, axel.rau at chaos1.de wrote:
>
>Am 14.10.2014 um 17:07 schrieb Axel Rau <Axel.Rau at chaos1.de>:
>>>We might need more to go on. Do you have a complete, minimal
>>>example? (See http://sscce.org/)
>>The attached zip archive
>Did someone could spend the time to look at it?
>Is my goal utopian?
I can't tell if this represents a bug in Twisted or not. After a quick
look through the code, I'm not really clear on why the program would
ever exit (I didn't find the calls to `reactor.stop`, I guess they're
hidden somewhere in conch "library" code), nor quite which code paths
you expect to work and which you expect to fail.
What is the expected behavior if I run test.py after editing it to point
at a host I have access to?
Is that the desired behavior?
If there is a second case, what one edit can I make to observe that
behavior? How does the behavior differ from what you're trying to
achieve?
Separately:
* You should rewrite this code to not use twisted.conch.client.connect.
That's some random library code no one ever expected application code to
use. It's public, so you can use it if you want, but that's no promise
it's any good.
* Use twisted.conch.endpoints.SSHCommandClientEndpoint to perform
`exec` requests
* Consider pitching in to complete
https://twistedmatrix.com/trac/ticket/6617 so you can use the new
`SSHSubsystemClientEndpoint` API that ticket introduces to set up your
SFTP connections.
Jean-Paul
More information about the Twisted-Python
mailing list