From f9500f6d90fa86a885d264dce6f177bcadf5c102 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Sun, 16 Apr 2017 23:32:23 +0200 Subject: [PATCH] fix fetch time bug --- hassio/tools.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hassio/tools.py b/hassio/tools.py index aedbd6df1..662211d12 100644 --- a/hassio/tools.py +++ b/hassio/tools.py @@ -27,9 +27,12 @@ async def fetch_current_versions(websession, beta=False): async with websession.get(url) as request: return await request.json(content_type=None) - except (ValueError, aiohttp.ClientError, asyncio.TimeoutError) as err: + except (aiohttp.ClientError, asyncio.TimeoutError, KeyError) as err: _LOGGER.warning("Can't fetch versions from %s! %s", url, err) + except json.JSONDecoder as err: + _LOGGER.warning("Can't parse versions from %s! %s", url, err) + def get_arch_from_image(image): """Return arch from hassio image name."""