From e05765bc1285c8dfa1b38aaa2338a6d1d7c7a25e Mon Sep 17 00:00:00 2001 From: Michael Nguyen Date: Thu, 26 Apr 2018 15:23:10 -0500 Subject: [PATCH] change HTTPError exception into RequestException for a more general case --- mycroft/configuration/config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mycroft/configuration/config.py b/mycroft/configuration/config.py index 299c17510d..a34bb4b7b3 100644 --- a/mycroft/configuration/config.py +++ b/mycroft/configuration/config.py @@ -18,7 +18,7 @@ import re import json import inflection from os.path import exists, isfile, join, dirname, expanduser -from requests import HTTPError +from requests import RequestException from mycroft.util.json_helper import load_commented_json from mycroft.util.log import LOG @@ -167,7 +167,7 @@ class RemoteConf(LocalConf): try: location = api.get_location() - except HTTPError as e: + except RequestException as e: LOG.error("RequestException fetching remote location: %s" % e.response.status_code) location = load_commented_json(cache).get('location') @@ -181,7 +181,7 @@ class RemoteConf(LocalConf): self.__setitem__(key, config[key]) self.store(cache) - except HTTPError as e: + except RequestException as e: LOG.error("RequestException fetching remote configuration: %s" % e.response.status_code) self.load_local(cache)