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:
parent
fe65c0258d
commit
3661e8bc74
7 changed files with 49 additions and 37 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue