I'm using fabric and trying to execute some commands on a remote machine.
I have written a python client which does this job.
def execute_command(timeout, command):
if timeout == -1:
return run(command, shell=False, pty=False, warn_only=True)
return run(command, shell=False, pty=False, warn_only=True, timeout=int(timeout))
ss -t | less
Figured it out.
When I disabled the psuedo terminal option in the arguments for run, I was able to achieve what I wanted.