I have a pylons project where, from within my controller, I am
instantiating an SSH client class using this class:
http://www.goldb.org/sshpython.html
With the following code:
sSHController = SSHController('xxx', 'root', 'password', '#')
sSHController.login()
Whereupon, at login(), it fails with a :
ValueError: signal only works in main thread
>> self.archive()
Module edigate.controllers.eligibility:730 in archive view
<< def archive(self):
sSHController = SSHController('xxx', 'root',
'password', '#')
sSHController.login()
>> sSHController.login()
Module edigate.controllers.SSHController:41 in login view
<<
"""
self.ssh = pyssh.Ssh(self.user_name, self.host_name,
self.port)
self.ssh.login(self.password)
>> self.ssh = pyssh.Ssh(self.user_name, self.host_name, self.port)
Module pyssh:106 in __init__ view
<< self.sshpid = 0 # perhaps merge this with isopen
self.old_handler = signal.getsignal(signal.SIGCHLD)
sig_handler = signal.signal(signal.SIGCHLD,
self.sig_handler)
def __del__(self):
>> sig_handler = signal.signal(signal.SIGCHLD, self.sig_handler)
I'm at a complete loss here. Can someone please point me in the right
direction to solving this? Perhaps this belongs in comp.lang.python,
not sure, thought I would start by looking in this group. Thanks,
RVince