[Twisted-Python] How-to raise errors with sshclient conch example in Twisted book

Ref: http://www.devshed.com/c/a/Python/SSH-with-Twisted/4/ Im new to Twisted and am trying to learn as quickly as I can. I apologize if this question is a waste of anybody's time. When working the with sshclient.py example (from the Twisted book, and the link above) I find the reactor hangs and does not raise an exception on connection failures or failed authentication. Ive been trying to work out how to catch these situations and shut down the reactor; or cleanup for another attempt, yet I cant seem to wrap my head around it. I imagine this is trivial and Im totally missing it. Any help would be greatly appreciated. Thx, TKiel

2008/5/30 asset <asset@impactdamage.com>: [...]
Try to turn on logging using twisted.python.log(sys.stderr).I would also suggest to put it after getpass in example you're using. For handling a connection failures have a look at clientConnectionFailed in ClientFactory and for a authentication errors receiveError in SSHClientTransport.
TKiel
jkk

2008/5/30 asset <asset@impactdamage.com>: [...]
Try to turn on logging using twisted.python.log(sys.stderr).I would also suggest to put it after getpass in example you're using. For handling a connection failures have a look at clientConnectionFailed in ClientFactory and for a authentication errors receiveError in SSHClientTransport.
TKiel
jkk
participants (2)
-
asset
-
Kuba Konczyk