[Twisted-Python] Conch and basic.LineReceiver

Vincent Bernat bernat at luffy.cx
Mon Jan 14 12:44:37 EST 2008


Hi !

I have modified sshsimpleserver.py to use a protocol based on
basic.LineReceiver. However, I get the following exception:

2008/01/14 19:40 +0200 [SSHChannel session (0) on SSHService ssh-connection
on SSHServerTransport,0,127.0.0.1] Unhandled Error
	Traceback (most recent call last):
	  File "/usr/lib/python2.4/site-packages/twisted/python/context.py", line
59, in callWithContext
	    return self.currentContext().callWithContext(ctx, func, *args, **kw)
	  File "/usr/lib/python2.4/site-packages/twisted/python/context.py", line
37, in callWithContext
	    return func(*args,**kw)
	  File "/usr/lib/python2.4/site-packages/twisted/conch/ssh/service.py",
line 42, in packetReceived
	    f(packet)
	  File "/usr/lib/python2.4/site-packages/twisted/conch/ssh/connection.py",
line 139, in ssh_CHANNEL_DATA
	    log.callWithLogger(channel, channel.dataReceived, data)
	--- <exception caught here> ---
	  File "/usr/lib/python2.4/site-packages/twisted/python/log.py", line 48,
in callWithLogger
	    return callWithContext({"system": lp}, func, *args, **kw)
	  File "/usr/lib/python2.4/site-packages/twisted/python/log.py", line 33,
in callWithContext
	    return context.call({ILogContext: newCtx}, func, *args, **kw)
	  File "/usr/lib/python2.4/site-packages/twisted/python/context.py", line
59, in callWithContext
	    return self.currentContext().callWithContext(ctx, func, *args, **kw)
	  File "/usr/lib/python2.4/site-packages/twisted/python/context.py", line
37, in callWithContext
	    return func(*args,**kw)
	  File "/usr/lib/python2.4/site-packages/twisted/conch/ssh/session.py",
line 107, in dataReceived
	    self.client.transport.write(data)
	  File "/usr/lib/python2.4/site-packages/twisted/conch/ssh/session.py",
line 156, in write
	    self.proto.dataReceived(data)
	  File "/usr/lib/python2.4/site-packages/twisted/protocols/basic.py", line
233, in dataReceived
	    if why or self.transport and self.transport.disconnecting:
	exceptions.AttributeError: SSHSessionProcessProtocol instance has no
attribute 'disconnecting'

How may I fix this?

I have attached my modified sshsimpleserver.py.

Thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sshsimpleserver.py
Type: text/x-python
Size: 3620 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20080114/3a669f06/attachment.py 


More information about the Twisted-Python mailing list