From 7564d539c1ae592f7ecac1993d8648933007bc3a Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 27 Oct 2016 00:37:02 -0700 Subject: [PATCH] Lint --- homeassistant/components/thingspeak.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/thingspeak.py b/homeassistant/components/thingspeak.py index f1689c1833e..6f01475372b 100644 --- a/homeassistant/components/thingspeak.py +++ b/homeassistant/components/thingspeak.py @@ -2,6 +2,7 @@ import logging import voluptuous as vol +from requests.exceptions import RequestException from homeassistant.const import ( CONF_API_KEY, CONF_ID, CONF_WHITELIST, @@ -41,7 +42,7 @@ def setup(hass, config): channel = thingspeak.Channel( channel_id, api_key=api_key, timeout=TIMEOUT) channel.get() - except: + except RequestException: _LOGGER.error("Error while accessing the ThingSpeak channel. " "Please check that the channel exists and your " "API key is correct.") @@ -60,7 +61,7 @@ def setup(hass, config): return try: channel.update({'field1': _state}) - except: + except RequestException: _LOGGER.error( 'Error while sending value "%s" to Thingspeak', _state)