Fix timeout on freegeoip (#581)

* Fix timeout on freegeoip

* Update updater.py

* Update supervisor.py

* Update dt.py

* Update hassos.py

* Update core.py

* Update hassos.py

* Update supervisor.py

* Update updater.py
This commit is contained in:
Pascal Vizeli
2018-07-21 19:01:20 +02:00
committed by GitHub
parent 57c58d81c0
commit f51c9704e0
5 changed files with 9 additions and 4 deletions

View File

@@ -1,4 +1,5 @@
"""Fetch last versions from webserver."""
import asyncio
from contextlib import suppress
from datetime import timedelta
import json
@@ -81,7 +82,7 @@ class Updater(JsonConfig, CoreSysAttributes):
async with self.sys_websession.get(url, timeout=10) as request:
data = await request.json(content_type=None)
except aiohttp.ClientError as err:
except (aiohttp.ClientError, asyncio.TimeoutError) as err:
_LOGGER.warning("Can't fetch versions from %s: %s", url, err)
raise HassioUpdaterError() from None