Re: timer for a function

2010-02-11 Thread Aahz
In article , mk wrote: > >self.conobj = paramiko.SSHClient() > >self.conobj.connect(self.ip, username=self.username, >key_filename=self.sshprivkey, port=self.port, timeout=opts.timeout) > >2. very slow SSH host that is hanging for 30+ seconds on key exchange. > >The timeout in the options regard

Re: timer for a function

2010-02-09 Thread mk
Stephen Hansen wrote: Question: how can I do that? Use another threaded class? Is there some other way? First of all, thanks for answer! What OS? Does this have to be OS-independant? Err, sorry -- this is Linux/UNIX only. Are you using more then one transport/SSLClient in your pro

Re: timer for a function

2010-02-08 Thread Stephen Hansen
On Fri, Feb 5, 2010 at 9:23 AM, mk wrote: > On paramiko mailing list I got the suggestion to build a timer and then > quit this by myself: > > The timeout option in connect() is for the socket, not for the entire >> operation. You are connected, so that timeout is no longer relevant. >> You woul

Re: timer for a function

2010-02-08 Thread Steven D'Aprano
On Fri, 05 Feb 2010 18:23:09 +0100, mk wrote: [...] > On paramiko mailing list I got the suggestion to build a timer and then > quit this by myself: > >> The timeout option in connect() is for the socket, not for the entire >> operation. You are connected, so that timeout is no longer relevant. >

timer for a function

2010-02-05 Thread mk
I have the following situation: 1. self.conobj = paramiko.SSHClient() self.conobj.connect(self.ip, username=self.username, key_filename=self.sshprivkey, port=self.port, timeout=opts.timeout) 2. very slow SSH host that is hanging for 30+ seconds on key exchange. The timeout in the options re