Fix error on first run because the landing page already run (#886)

* Fix error on first run because the landing page already run

* Update homeassistant.py
This commit is contained in:
Pascal Vizeli 2019-01-14 21:25:17 +01:00 committed by GitHub
parent 2b5520405f
commit a0b5d0b67e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -211,15 +211,8 @@ class HomeAssistant(JsonConfig, CoreSysAttributes):
while True:
if await self.instance.install('landingpage'):
break
_LOGGER.warning("Fails install landingpage, retry after 60sec")
await asyncio.sleep(60)
# Run landingpage after installation
_LOGGER.info("Start landing page")
try:
await self._start()
except HomeAssistantError:
_LOGGER.warning("Can't start landing page")
_LOGGER.warning("Fails install landingpage, retry after 30sec")
await asyncio.sleep(30)
@process_lock
async def install(self):
@ -233,8 +226,8 @@ class HomeAssistant(JsonConfig, CoreSysAttributes):
tag = self.last_version
if tag and await self.instance.install(tag):
break
_LOGGER.warning("Error on install Home Assistant. Retry in 60sec")
await asyncio.sleep(60)
_LOGGER.warning("Error on install Home Assistant. Retry in 30sec")
await asyncio.sleep(30)
# finishing
_LOGGER.info("Home Assistant docker now installed")