Let docker-py handle decoding and JSON parsing of stream data. Fixes #4930.

pull/18777/head
Chris Houseknecht 8 years ago committed by Matt Clay
parent 9432adfaf7
commit 0e4b470ee2

@ -424,8 +424,7 @@ class ImageManager(DockerBaseClass):
if not self.check_mode:
status = None
try:
for line in self.client.push(repository, tag=tag, stream=True):
line = json.loads(line)
for line in self.client.push(repository, tag=tag, stream=True, decode=True):
self.log(line, pretty_print=True)
if line.get('errorDetail'):
raise Exception(line['errorDetail']['message'])

Loading…
Cancel
Save