Fix typos (#704)

This commit is contained in:
Fabian Affolter
2018-09-18 18:17:20 +02:00
committed by GitHub
parent f5845564db
commit c2299ef8da
23 changed files with 186 additions and 184 deletions

View File

@@ -1,4 +1,4 @@
"""Multible tasks."""
"""A collection of tasks."""
import asyncio
import logging
@@ -22,7 +22,7 @@ RUN_WATCHDOG_HOMEASSISTANT_API = 300
class Tasks(CoreSysAttributes):
"""Handle Tasks inside HassIO."""
"""Handle Tasks inside Hass.io."""
def __init__(self, coresys):
"""Initialize Tasks."""
@@ -58,7 +58,7 @@ class Tasks(CoreSysAttributes):
_LOGGER.info("All core tasks are scheduled")
async def _update_addons(self):
"""Check if an update is available for an addon and update it."""
"""Check if an update is available for an Add-on and update it."""
tasks = []
for addon in self.sys_addons.list_addons:
if not addon.is_installed or not addon.auto_update:
@@ -71,14 +71,14 @@ class Tasks(CoreSysAttributes):
tasks.append(addon.update())
else:
_LOGGER.warning(
"Addon %s will be ignore, schema tests fails", addon.slug)
"Add-on %s will be ignore, schema tests fails", addon.slug)
if tasks:
_LOGGER.info("Addon auto update process %d tasks", len(tasks))
_LOGGER.info("Add-on auto update process %d tasks", len(tasks))
await asyncio.wait(tasks)
async def _update_supervisor(self):
"""Check and run update of supervisor hassio."""
"""Check and run update of Supervisor Hass.io."""
if not self.sys_supervisor.need_update:
return
@@ -91,23 +91,23 @@ class Tasks(CoreSysAttributes):
await self.sys_supervisor.update()
async def _watchdog_homeassistant_docker(self):
"""Check running state of docker and start if they is close."""
# if Home-Assistant is active
"""Check running state of Docker and start if they is close."""
# if Home Assistant is active
if not await self.sys_homeassistant.is_initialize() or \
not self.sys_homeassistant.watchdog or \
self.sys_homeassistant.error_state:
return
# if Home-Assistant is running
# if Home Assistant is running
if self.sys_homeassistant.in_progress or \
await self.sys_homeassistant.is_running():
return
_LOGGER.warning("Watchdog found a problem with Home-Assistant docker!")
_LOGGER.warning("Watchdog found a problem with Home Assistant Docker!")
await self.sys_homeassistant.start()
async def _watchdog_homeassistant_api(self):
"""Create scheduler task for montoring running state of API.
"""Create scheduler task for monitoring running state of API.
Try 2 times to call API before we restart Home-Assistant. Maybe we had
a delay in our system.
@@ -130,10 +130,10 @@ class Tasks(CoreSysAttributes):
retry_scan += 1
if retry_scan == 1:
self._cache[HASS_WATCHDOG_API] = retry_scan
_LOGGER.warning("Watchdog miss API response from Home-Assistant")
_LOGGER.warning("Watchdog miss API response from Home Assistant")
return
_LOGGER.error("Watchdog found a problem with Home-Assistant API!")
_LOGGER.error("Watchdog found a problem with Home Assistant API!")
try:
await self.sys_homeassistant.restart()
finally: