On Wed, Feb 4, 2009 at 11:49 AM, ray terrill <rayjohnterr...@gmail.com> wrote: > Could you give me an example of how handling the connectionLost() could be > accomplished? I'm not sure where I need to integrate that into what I've > already got.
For example: class ClientCommandTransport( transport.SSHClientTransport): def __init__(self, username, password, command): self.username = username self.password = password self.command = command def verifyHostKey(self, pubKey, fingerprint): # in a real app, you should verify that the fingerprint matches # the one you expected to get from this server return defer.succeed(True) def connectionSecure(self): self.requestService( PasswordAuth(self.username, self.password, ClientConnection(self.command))) def connectionLost(self, reason): print 'do something because the connection went away' HTH, -p -- Paul Swartz paulswartz at gmail dot com http://paulswartz.net/ AIM: z3penguin _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python