On 12:37 am, [email protected] wrote: >Hi, >I'm a Twisted newbie and I'm working on a custom ssh daemon for serving >git. >I happened to read one of the example files sshsimpleserver.py at * >http://twistedmatrix.com/projects/conch/documentation/examples/* . At >line >93 ExampleSession is registered as an Adapter for ExampleAvatar >adapting it >to session.ISession. As i understand, to actually do the adaptation a >call >like ISession(ExampleAvatar) has to be done (?). This call hasn't been >done.
It's more like ISession(ExampleAvatar()) - the instance is adapted, not the class. Conch does this in SSHSession in a few places: http://twistedmatrix.com/trac/browser/tags/releases/twisted-11.0.0/twisted/conch/ssh/session.py#L23 So using SSHSession is the main way to have your ISession adapter make a difference. Jean-Paul _______________________________________________ Twisted-Python mailing list [email protected] http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
