Skip to content

Commit

Permalink
assure we flush the stdin/stderr
Browse files Browse the repository at this point in the history
Signed-off-by: Sorin Sbarnea <[email protected]>
  • Loading branch information
ssbarnea committed Feb 18, 2018
1 parent 44e21c6 commit 5f6afd4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rtox/rtox.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ def run(self, command):

time.sleep(0.1)

if channel.recv_ready():
length = len(channel.in_buffer)
sys.stdout.write(channel.recv(length))
if channel.recv_stderr_ready():
length = len(channel.in_stderr_buffer)
sys.stderr.write(channel.recv_stderr(length))

return channel.recv_exit_status()
except KeyboardInterrupt:
channel.close()
Expand Down

0 comments on commit 5f6afd4

Please sign in to comment.