[Twisted-Python] getPeer() inside conch

Glyph Lefkowitz glyph at twistedmatrix.com
Thu Oct 1 22:53:05 EDT 2009

On Thu, Oct 1, 2009 at 10:21 PM, Benjamin Rutt <rutt.4 at osu.edu> wrote:

> (A/B) it looks like the SSHChannel implementation of getPeer() is faulty.
> If I change my two-line implementation of getPeer() inside
> SSHSessionProcessProtocol to simply 'return self.session.getPeer()', I get:
>   File
> "/home/ruttbe/dev/python/twisted-8.2.0-inst/lib/python/twisted/conch/ssh/session.py",
> line 216, in getPeer
>     return self.session.getPeer()
>   File
> "/home/ruttbe/dev/python/twisted-8.2.0-inst/lib/python/twisted/conch/ssh/channel.py",
> line 261, in getPeer
>     return('SSH', )+self.conn.transport.getPeer()
> AttributeError: SSHServerTransport instance has no attribute 'getPeer'

OK, I give up :).  Looks like that is pretty clearly a bug, though.

> (C) regarding adding a test, which file do you think would be suitable
> here?  something in the twisted/test dir?

I am not sure which exact file, but something of the form

Paul Swartz (z3p) should really weigh in on this.  You can find him on IRC
most days, although hopefully he's reading the mailing list :).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20091001/90851e55/attachment.htm 

More information about the Twisted-Python mailing list