Let docker-py handle decoding and JSON parsing of stream data. Fixes #4930.
This commit is contained in:
parent
9432adfaf7
commit
0e4b470ee2
1 changed files with 1 additions and 2 deletions
|
@ -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…
Reference in a new issue