Bugfix return value supervisor update (#296)

* Update supervisor.py

* Update addon.py
This commit is contained in:
Pascal Vizeli 2018-01-06 22:35:58 +01:00 committed by GitHub
parent 56abfb6adc
commit 0f58bb35ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -568,7 +568,7 @@ class Addon(CoreSysAttributes):
last_state = await self.state()
if self.last_version == self.version_installed:
_LOGGER.info("No update available for Addon %s", self._id)
_LOGGER.warning("No update available for Addon %s", self._id)
return False
if not await self.instance.update(self.last_version):

View File

@ -46,14 +46,16 @@ class Supervisor(CoreSysAttributes):
version = version or self.last_version
if version == self._supervisor.version:
_LOGGER.info("Version %s is already installed", version)
_LOGGER.warning("Version %s is already installed", version)
return
_LOGGER.info("Update supervisor to version %s", version)
if await self.instance.install(version):
self._loop.call_later(1, self._loop.stop)
else:
_LOGGER.error("Update of hass.io fails!")
return True
_LOGGER.error("Update of hass.io fails!")
return False
@property
def in_progress(self):