Re: [Twisted-Python] Twisted Conch SSH timeout

2009-02-02 Thread Paul Swartz
On Mon, Feb 2, 2009 at 2:22 PM, ray terrill wrote: > I've got a Twisted Conch/SSH script that I inherited which I'm using to run > commands remotely on some servers. I'd like to add a timeout for servers > that are down, etc (the script currently hangs on these), but I'm not sure > where to add t

[Twisted-Python] Maximum Recursion Depth Error with Twisted 8.2/Stackless 2.6.1

2009-02-02 Thread Andrew Francis
Hi Colleagues: I recently updated to Stackless 2.6.1 and Twisted 8.2. I executed the following programme that works fine under Stackless 2.5.2 and Twisted (including 8.2) and I received the following error: traceback (most recent call last): File "ToyProcessor5.py", line 60, in twiste

[Twisted-Python] Twisted Conch SSH timeout

2009-02-02 Thread ray terrill
I've got a Twisted Conch/SSH script that I inherited which I'm using to run commands remotely on some servers. I'd like to add a timeout for servers that are down, etc (the script currently hangs on these), but I'm not sure where to add that functionality. Any help would be appreciated. Thanks, -

Re: [Twisted-Python] Re: How can I disconnect ssl connection from the client side?

2009-02-02 Thread Jean-Paul Calderone
On Mon, 02 Feb 2009 16:15:16 +0100, Johann Borck wrote: Jean-Paul Calderone wrote: On Mon, 02 Feb 2009 14:45:40 +0100, Johann Borck wrote: [snip] The correct way is to call conn.disconnect()/transport.loseConnection() in f1 instead of in cancel. It's "correct" in that it works around the

Re: [Twisted-Python] Re: How can I disconnect ssl connection from the client side?

2009-02-02 Thread Johann Borck
Jean-Paul Calderone wrote: On Mon, 02 Feb 2009 14:45:40 +0100, Johann Borck wrote: [snip] The correct way is to call conn.disconnect()/transport.loseConnection() in f1 instead of in cancel. It's "correct" in that it works around the bug in Twisted. However, this *is* a bug in Twisted which

Re: [Twisted-Python] Re: How can I disconnect ssl connection from the client side?

2009-02-02 Thread Atsuo Ishimoto
> This does look like a bug in Twisted. Could you file a ticket for it? Done. #3644. > > In the mean time, you can work around this by using a simpler cancel > technique. Get rid of the "conn.disconnect()" call in cancel and > instead call the protocol's transport's loseConnection method in f1

Re: [Twisted-Python] Re: How can I disconnect ssl connection from the client side?

2009-02-02 Thread Jean-Paul Calderone
On Mon, 02 Feb 2009 14:45:40 +0100, Johann Borck wrote: [snip] The correct way is to call conn.disconnect()/transport.loseConnection() in f1 instead of in cancel. It's "correct" in that it works around the bug in Twisted. However, this *is* a bug in Twisted which should be fixed. Then it

Re: [Twisted-Python] Re: How can I disconnect ssl connection from the client side?

2009-02-02 Thread Johann Borck
Atsuo Ishimoto wrote: ... class Client(basic.LineReceiver): def connectionMade(self): class dmyfile: def read(self, n): if CANCELED: return else: return '1' s = basic.FileSender() pri

Re: [Twisted-Python] Re: How can I disconnect ssl connection from the client side?

2009-02-02 Thread Jean-Paul Calderone
On Mon, 2 Feb 2009 19:48:50 +0900, Atsuo Ishimoto wrote: Investigating further, I found this is not SSL related problem, but in my code may have bug. In the following script, I expect that reactor stops in 2 secs after it started, but connectionLost() is not fired at all. Is this a bug in Twist

[Twisted-Python] Re: How can I disconnect ssl connection from the client side?

2009-02-02 Thread Atsuo Ishimoto
Investigating further, I found this is not SSL related problem, but in my code may have bug. In the following script, I expect that reactor stops in 2 secs after it started, but connectionLost() is not fired at all. Is this a bug in Twisted? Or Am I missing something? ===