mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-06-30 13:56:32 +00:00
Fix latest issue (#1214)
* Fix latest issue * Use also update now * Fix style
This commit is contained in:
parent
e40f2ed8e3
commit
930a32de1a
@ -250,7 +250,7 @@ class DockerInterface(CoreSysAttributes):
|
|||||||
self, tag: str, image: Optional[str] = None, latest: bool = False
|
self, tag: str, image: Optional[str] = None, latest: bool = False
|
||||||
) -> Awaitable[None]:
|
) -> Awaitable[None]:
|
||||||
"""Update a Docker image."""
|
"""Update a Docker image."""
|
||||||
return self.sys_run_in_executor(self._update, tag, image)
|
return self.sys_run_in_executor(self._update, tag, image, latest)
|
||||||
|
|
||||||
def _update(
|
def _update(
|
||||||
self, tag: str, image: Optional[str] = None, latest: bool = False
|
self, tag: str, image: Optional[str] = None, latest: bool = False
|
||||||
@ -266,7 +266,7 @@ class DockerInterface(CoreSysAttributes):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Update docker image
|
# Update docker image
|
||||||
self._install(tag, image, latest)
|
self._install(tag, image=image, latest=latest)
|
||||||
|
|
||||||
# Stop container & cleanup
|
# Stop container & cleanup
|
||||||
with suppress(DockerAPIError):
|
with suppress(DockerAPIError):
|
||||||
|
@ -109,7 +109,7 @@ class Supervisor(CoreSysAttributes):
|
|||||||
|
|
||||||
_LOGGER.info("Update Supervisor to version %s", version)
|
_LOGGER.info("Update Supervisor to version %s", version)
|
||||||
try:
|
try:
|
||||||
await self.instance.install(version, latest=True)
|
await self.instance.update(version, latest=True)
|
||||||
except DockerAPIError:
|
except DockerAPIError:
|
||||||
_LOGGER.error("Update of Hass.io fails!")
|
_LOGGER.error("Update of Hass.io fails!")
|
||||||
raise SupervisorUpdateError() from None
|
raise SupervisorUpdateError() from None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user