mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-09-12 11:06:04 +00:00
(cherry picked from commit b7b684b9c5)
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
bugfixes:
|
||||
- "docker_image, docker_image_pull, docker_container - also handle errors if only ``errorDetail`` is set, but not ``error``.
|
||||
The ``error`` field has been `deprecated in Moby apparently a very long time ago <https://github.com/moby/moby/commit/3043c2641990d94298c6377b7ef14709263a4709>`__
|
||||
(https://github.com/ansible-collections/community.docker/pull/1302)."
|
||||
@@ -460,7 +460,7 @@ class AnsibleDockerClientBase(Client):
|
||||
self._raise_for_status(response)
|
||||
for line in self._stream_helper(response, decode=True):
|
||||
self.log(line, pretty_print=True)
|
||||
if line.get('error'):
|
||||
if line.get('error') or line.get('errorDetail'):
|
||||
if line.get('errorDetail'):
|
||||
error_detail = line.get('errorDetail')
|
||||
self.fail("Error pulling %s - code: %s message: %s" % (name,
|
||||
|
||||
@@ -911,7 +911,7 @@ class ImageManager(DockerBaseClass):
|
||||
self.log(line, pretty_print=True)
|
||||
self._extract_output_line(line, build_output)
|
||||
|
||||
if line.get('error'):
|
||||
if line.get('error') or line.get('errorDetail'):
|
||||
if line.get('errorDetail'):
|
||||
errorDetail = line.get('errorDetail')
|
||||
self.fail(
|
||||
|
||||
Reference in New Issue
Block a user