mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-15 13:16:29 +00:00
Fix cleanup
This commit is contained in:
parent
e2bf267713
commit
fc17893158
@ -194,11 +194,13 @@ class DockerBase(object):
|
|||||||
if self._is_running():
|
if self._is_running():
|
||||||
self._stop()
|
self._stop()
|
||||||
|
|
||||||
image = "{}:latest".format(self.image)
|
_LOGGER.info("Remove docker %s with latest and %s",
|
||||||
|
self.image, self.version)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.dock.images.remove(image=image, force=True)
|
self.dock.images.remove(image=image, force=True)
|
||||||
except docker.errors.DockerException as err:
|
except docker.errors.DockerException as err:
|
||||||
_LOGGER.warning("Can't remove image %s -> %s", image, err)
|
_LOGGER.warning("Can't remove image %s -> %s", self.image, err)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user