def image_inspect(self, image): try: return self._client.inspect_image(image) except docker.errors.NotFound: raise ContainerImageNotFound("%s not pulled, cannot get digest" % image, image=image)
def image_inspect(self, image): try: return self._run_docker(subcommand='image inspect', args=image)[0] except (IndexError, ContainerCLIError) as exc: msg = f"{image} not pulled, cannot get digest" if exc.stdout == '[]' and exc.stderr == f'Error: no such image: {image}': log.warning(msg, image) return [] else: raise ContainerImageNotFound(msg, image=image)
def image_inspect(self, image): try: return self._run_docker(subcommand='image inspect', args=image) except ContainerCLIError as exc: msg = "%s not pulled, cannot get digest" % image if exc.stdout == '[]' and exc.stderr == 'Error: no such image: {image}'.format( image=image): log.warning(msg, image) return [] else: raise ContainerImageNotFound(msg, image=image)