We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In my code, SSHLibrary used like below and this code is run by another thread:
SSHLibrary(...).open_connection(...) # do something here SSHLibrary.close_all_connections()
This raise exception:
File "/p4_ws/doyou89.jung/workspace/projects/cosmos/.venv/lib/python3.8/site-packages/SSHLibrary/library.py", line 765, in close_all_connections self._connections.close_all() File "/p4_ws/doyou89.jung/workspace/projects/cosmos/.venv/lib/python3.8/site-packages/SSHLibrary/sshconnectioncache.py", line 27, in close_all connection.close() File "/p4_ws/doyou89.jung/workspace/projects/cosmos/.venv/lib/python3.8/site-packages/SSHLibrary/pythonclient.py", line 302, in close return super(PythonSSHClient, self).close() File "/p4_ws/doyou89.jung/workspace/projects/cosmos/.venv/lib/python3.8/site-packages/SSHLibrary/abstractclient.py", line 160, in close logger.log_background_messages() File "/p4_ws/doyou89.jung/workspace/projects/cosmos/.venv/lib/python3.8/site-packages/robotbackgroundlogger.py", line 101, in log_background_messages raise RuntimeError( RuntimeError: Logging background messages is only allowed from the main thread. Current thread name: schedule_commands_01
Because close() method in abstractclient.py do not handle RuntimeError, the code of close() is:
def close(self): """Closes the connection.""" self._sftp_client = None self._scp_transfer_client = None self._scp_all_client = None self._shell = None self.client.close() try: logger.log_background_messages() except AttributeError: pass
I think RuntimeError should be added here.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In my code, SSHLibrary used like below and this code is run by another thread:
This raise exception:
Because close() method in abstractclient.py do not handle RuntimeError, the code of close() is:
I think RuntimeError should be added here.
The text was updated successfully, but these errors were encountered: