mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-06-24 02:46:30 +00:00
fix lint
This commit is contained in:
parent
40e8f411ff
commit
ebf4daf4cc
@ -15,7 +15,7 @@ from .validate import (
|
||||
from ..const import (
|
||||
FILE_HASSIO_ADDONS, ATTR_VERSION, ATTR_SLUG, ATTR_REPOSITORY, ATTR_LOCATON,
|
||||
REPOSITORY_CORE, REPOSITORY_LOCAL, ATTR_USER, ATTR_SYSTEM)
|
||||
from ..tools import JsonConfig
|
||||
from ..tools import JsonConfig, read_json_file
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
@ -11,7 +11,6 @@ from ..const import (
|
||||
ATTR_URL, ATTR_DESCRIPTON, ATTR_DETACHED, ATTR_NAME, ATTR_REPOSITORY,
|
||||
ATTR_BUILD, ATTR_AUTO_UPDATE, ATTR_NETWORK, ATTR_HOST_NETWORK,
|
||||
BOOT_AUTO, BOOT_MANUAL)
|
||||
from ..tools import read_json_file
|
||||
from ..validate import DOCKER_PORTS
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
@ -101,13 +101,13 @@ class HomeAssistant(JsonConfig):
|
||||
while True:
|
||||
# read homeassistant tag and install it
|
||||
if not self.last_version:
|
||||
await self.config.fetch_update_infos(websession)
|
||||
await self.config.fetch_update_infos(self.websession)
|
||||
|
||||
tag = self.last_version
|
||||
if tag and await self.docker.install(tag):
|
||||
break
|
||||
_LOGGER.warning("Error on install HomeAssistant. Retry in 60sec")
|
||||
await asyncio.sleep(60, loop=loop)
|
||||
await asyncio.sleep(60, loop=self.loop)
|
||||
|
||||
# store version
|
||||
_LOGGER.info("HomeAssistant docker now installed")
|
||||
@ -147,3 +147,10 @@ class HomeAssistant(JsonConfig):
|
||||
Return a coroutine.
|
||||
"""
|
||||
return self.docker.logs()
|
||||
|
||||
def is_running(self):
|
||||
"""Return True if docker container is running.
|
||||
|
||||
Return a coroutine.
|
||||
"""
|
||||
return self.docker.is_running()
|
||||
|
@ -128,7 +128,7 @@ class Snapshot(object):
|
||||
self.homeassistant_devices = homeassistant.devices
|
||||
|
||||
# custom image
|
||||
if self.homeassistant.is_custom_image:
|
||||
if homeassistant.is_custom_image:
|
||||
self.homeassistant_image = homeassistant.image
|
||||
|
||||
def restore_homeassistant(self, homeassistant):
|
||||
|
@ -37,6 +37,6 @@ DOCKER_PORTS = vol.Schema({
|
||||
|
||||
SCHEMA_HASS_CONFIG = vol.Schema({
|
||||
vol.Optional(ATTR_DEVICES, default=[]): HASS_DEVICES,
|
||||
vol.inclusive(ATTR_IMAGE, 'custom_hass'): vol.Coerce(str),
|
||||
vol.inclusive(ATTR_LAST_VERSION, 'custom_hass'): vol.Coerce(str),
|
||||
vol.Inclusive(ATTR_IMAGE, 'custom_hass'): vol.Coerce(str),
|
||||
vol.Inclusive(ATTR_LAST_VERSION, 'custom_hass'): vol.Coerce(str),
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user