Check that web cache exists before loading it

pull/1613/head
Åke Forslund 2018-05-25 21:37:50 +02:00
parent 7b3885c3e4
commit 85365823bc
1 changed files with 2 additions and 1 deletions

View File

@ -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