Fix remove
@@ -211,12 +211,14 @@ class DockerBase(object):
self.image, self.version)
try:
+ with suppress(docker.errors.ImageNotFound):
self.dock.images.remove(
image="{}:latest".format(self.image), force=True)
+
+ with suppress(docker.errors.ImageNotFound):
self.dock.images.remove(
image="{}:{}".format(self.image, self.version), force=True)
- except docker.errors.ImageNotFound:
- return True
+
except docker.errors.DockerException as err:
_LOGGER.warning("Can't remove image %s -> %s", self.image, err)
return False
