Skip to content

Commit

Permalink
* tailing stdout needs bytestrings
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasheinrich committed Aug 1, 2017
1 parent 0db273e commit 6e48ad7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packtivity/handlers/environment_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def docker_pull(docker_pull_cmd,log,state,metadata):
time.sleep(0.5)
log.debug('process children: %s',[x for x in psutil.Process(proc.pid).children(recursive = True)])

for line in iter(proc.stdout.readline, ''):
for line in iter(proc.stdout.readline, b''):
pulllog.info(line.strip())
while proc.poll() is None:
pass
Expand Down Expand Up @@ -206,7 +206,7 @@ def docker_run_cmd(fullest_command,log,state,metadata):
time.sleep(0.5)
log.debug('process children: %s',[x for x in psutil.Process(proc.pid).children(recursive = True)])

for line in iter(proc.stdout.readline, ''):
for line in iter(proc.stdout.readline, b''):
runlog.info(line.strip())
while proc.poll() is None:
pass
Expand Down

0 comments on commit 6e48ad7

Please sign in to comment.