Describe the bug
After running a command with SSHClient.run_command(), then waiting with wait_finished(), the exit code is sometimes None
To Reproduce
Unfortulatly I'm not able to reproduce, it happens very rarely.
But this is how I tried to reproduce, which depict how I'm using the lib in real world :
import os
import getpass
from pssh.clients import SSHClient
_pass = getpass.getpass()
for i in range(200):
print(f"Try {i}")
client = SSHClient("lgwebsi1", user=os.getlogin(), password=_pass)
command = "sudo -S curl --haproxy-protocol -sk -o /dev/null -w '%{http_code}' https://localhost/health"
host_io = client.run_command(command)
host_io.stdin.write(f"{_pass}\n")
host_io.stdin.flush()
client.wait_finished(host_io)
returncode = host_io.exit_code
if returncode is None:
print("Failed")
This command is an example, it happens with various commands, and not always the same.
Expected behavior
Getting exit code
Actual behaviour
exit code is None
Screenshots
If applicable, add screenshots to help explain your problem.
Additional information
parallel-ssh 2.16.0.post1
ssh2-python 1.2.0.post1
Python 3.12.13
Describe the bug
After running a command with SSHClient.run_command(), then waiting with wait_finished(), the exit code is sometimes None
To Reproduce
Unfortulatly I'm not able to reproduce, it happens very rarely.
But this is how I tried to reproduce, which depict how I'm using the lib in real world :
This command is an example, it happens with various commands, and not always the same.
Expected behavior
Getting exit code
Actual behaviour
exit code is None
Screenshots
If applicable, add screenshots to help explain your problem.
Additional information
parallel-ssh 2.16.0.post1
ssh2-python 1.2.0.post1
Python 3.12.13