ssh keepalive
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Thu Oct 2 05:28:45 EDT 2008
En Thu, 02 Oct 2008 05:26:25 -0300, loial <jldunn2000 at googlemail.com>
escribió:
> <<Show us a bit of your code, so we can see why is None there.>>
Still not enough.
From your first post, the error was:
> 'NoneType' object has no attribute 'exec_command'
> def command ( self , command ) :
> """ process requested command through ssh """
> print command
> if not self._connected :
> return False , "No SSH connection available"
> try :
> stdin , stdout , stderr =
> self._ssh.exec_command( command )
So you'll have to analyze how (and when) self._ssh might become None. This
function just *uses* self._ssh - look for some other places where
self._ssh is assigned to (or perhaps, deleted, if there is a class
attributes set to None).
--
Gabriel Genellina
More information about the Python-list
mailing list