diff --git a/lib/ansible/modules/cloud/docker/docker_image.py b/lib/ansible/modules/cloud/docker/docker_image.py index 0a9ab09096..7d97d98419 100644 --- a/lib/ansible/modules/cloud/docker/docker_image.py +++ b/lib/ansible/modules/cloud/docker/docker_image.py @@ -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'])