[Twisted-Python] ClientCreator error handling

Mike Christey mikeeee at hush.com
Tue Mar 7 13:19:27 EST 2006


Hi,

I don't know if this is right place to ask this kind of
question but I'm really stuck at this problem and documentation
seems not help (or better, I'm dumb).

For me who uses try/except on daily basis the twisted error handling
seems to be voodoo. All I want to do is add 'connection refused', 
'dns lookup er ror' and similiar handling to the sshsimpleclient.py 
script.

I tried something like:

def errorCallback(failure):
        print "Err"
        [...] # other code



d = defer.Deferred()
d.addErrback(errorCallback)
protocol.ClientCreator(reactor, SimpleTransport).connectTCP(HOST, 
22)
reactor.run()

but that's probably have nothing to do with way it should be done..

Anyone could help me please?




Concerned about your privacy? Instantly send FREE secure email, no account required
http://www.hushmail.com/send?l=480

Get the best prices on SSL certificates from Hushmail
https://www.hushssl.com?l=485





More information about the Twisted-Python mailing list