Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get(self, id_):
"""Get Image from id."""
with self._client() as podman:
result = podman.GetImage(id_)
return Image(self._client, result["image"]["id"], result["image"])
def list(self):
"""List all images in the libpod image store."""
with self._client() as podman:
results = podman.ListImages()
for img in results["images"]:
yield Image(self._client, img["id"], img)