Merge pull request #1194 from home-assistant/dev

Release 172
This commit is contained in:
Pascal Vizeli 2019-08-08 23:21:26 +02:00 committed by GitHub
commit 4c13dfb43c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 13 deletions

View File

@ -16,7 +16,7 @@
"python.linting.enabled": true,
"python.formatting.provider": "black",
"python.formatting.blackArgs": [
"--target--version",
"--target-version",
"py37"
],
"editor.formatOnPaste": false,
@ -24,4 +24,4 @@
"editor.formatOnType": true,
"files.trimTrailingWhitespace": true
}
}
}

View File

@ -3,7 +3,7 @@ from pathlib import Path
from ipaddress import ip_network
HASSIO_VERSION = "171"
HASSIO_VERSION = "172"
URL_HASSIO_ADDONS = "https://github.com/home-assistant/hassio-addons"
URL_HASSIO_VERSION = "https://version.home-assistant.io/{channel}.json"

View File

@ -172,6 +172,7 @@ class HassIO(CoreSysAttributes):
async def repair(self):
"""Repair system integrity."""
_LOGGER.info("Start repairing of Hass.io Environment")
await self.sys_run_in_executor(self.sys_docker.repair)
# Restore core functionality
@ -184,3 +185,4 @@ class HassIO(CoreSysAttributes):
# Tag version for latest
await self.sys_supervisor.repair()
_LOGGER.info("Finished repairing of Hass.io Environment")

View File

@ -76,20 +76,18 @@ class HomeAssistant(JsonConfig, CoreSysAttributes):
async def load(self) -> None:
"""Prepare Home Assistant object."""
with suppress(DockerAPIError):
try:
# Evaluate Version if we lost this information
if not self.version:
if await self.instance.is_running():
self.version = self.instance.version
else:
self.version = await self.instance.get_latest_version()
self.save_data()
self.version = await self.instance.get_latest_version()
await self.instance.attach(tag=self.version)
return
_LOGGER.info("No Home Assistant Docker image %s found.", self.image)
await self.install_landingpage()
except DockerAPIError:
_LOGGER.info("No Home Assistant Docker image %s found.", self.image)
await self.install_landingpage()
else:
self.version = self.instance.version
self.save_data()
@property
def machine(self) -> str: