Fix latest issue (#1214)

* Fix latest issue

* Use also update now

* Fix style
This commit is contained in:
Pascal Vizeli 2019-08-15 12:42:21 +02:00 committed by GitHub
parent e40f2ed8e3
commit 930a32de1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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):

View File

@ -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