Fix build against the swarm cluster by joining buffered output before parsing json.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin 2015-10-02 19:47:27 -04:00
commit 3661e8bc74
7 changed files with 49 additions and 37 deletions

View file

@ -1,7 +1,5 @@
import json
import six
from compose import utils
@ -16,9 +14,7 @@ def stream_output(output, stream):
lines = {}
diff = 0
for chunk in output:
if six.PY3:
chunk = chunk.decode('utf-8')
for chunk in utils.stream_as_text(output):
event = json.loads(chunk)
all_events.append(event)