Skip to content

Commit

Permalink
Fix subprocess stdout gathering for py3
Browse files Browse the repository at this point in the history
  • Loading branch information
pkittenis committed Jul 4, 2016
1 parent ee83fd6 commit 2a0e7d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions embedded_server/embedded_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ def check_channel_exec_request(self, channel, cmd,
return True

def _read_response(self, channel, process):
(output, _) = process.communicate()
for line in output:
for line in process.stdout:
channel.send(line)
process.communicate()
channel.send_exit_status(process.returncode)
logger.debug("Command finished with return code %s", process.returncode)
# Let clients consume output from channel before closing
Expand Down

0 comments on commit 2a0e7d1

Please sign in to comment.