From 85365823bc5b18dac385d89187a3d324bd0fac5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85ke=20Forslund?= Date: Fri, 25 May 2018 21:37:50 +0200 Subject: [PATCH] Check that web cache exists before loading it --- mycroft/configuration/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mycroft/configuration/config.py b/mycroft/configuration/config.py index 8ffcc7bfdb..72edccc3e9 100644 --- a/mycroft/configuration/config.py +++ b/mycroft/configuration/config.py @@ -166,7 +166,8 @@ class RemoteConf(LocalConf): except RequestException as e: LOG.error("RequestException fetching remote location: {}" .format(str(e))) - location = load_commented_json(cache).get('location') + if exists(cache) and isfile(cache): + location = load_commented_json(cache).get('location') if location: setting["location"] = location