UPdate log messages

This commit is contained in:
Fabian Affolter 2016-03-15 23:52:55 +01:00
parent 1f7e0936fa
commit b29eff5ef1

View file

@ -61,12 +61,10 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
return False return False
except requests.exceptions.MissingSchema: except requests.exceptions.MissingSchema:
_LOGGER.error("Missing resource or schema in configuration. " _LOGGER.error("Missing resource or schema in configuration. "
"Please check the details in the configuration file.") "Please check the details in the configuration file")
return False return False
except requests.exceptions.ConnectionError: except requests.exceptions.ConnectionError:
_LOGGER.error("No route to resource/endpoint: '%s'. " _LOGGER.error("No route to resource/endpoint: %s", url)
"Please check the details in the configuration file.",
url)
return False return False
rest = GlancesData(url) rest = GlancesData(url)
@ -167,6 +165,5 @@ class GlancesData(object):
response = requests.get(self._resource, timeout=10) response = requests.get(self._resource, timeout=10)
self.data = response.json() self.data = response.json()
except requests.exceptions.ConnectionError: except requests.exceptions.ConnectionError:
_LOGGER.error("No route to host/endpoint '%s'. Is device offline?", _LOGGER.error("No route to host/endpoint: %s", self._resource)
self._resource)
self.data = None self.data = None