Fixed flake8 violations

pull/238/head
Rohit Kabadi 2015-08-02 18:51:13 -07:00
parent 3d57c80656
commit e6aabb9706
2 changed files with 5 additions and 1 deletions

View File

@ -30,6 +30,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
class TemperSensor(Entity):
""" Represents an Temper temperature sensor within Home Assistant. """
def __init__(self, temper_device, temp_unit, name):
self.temper_device = temper_device
self.temp_unit = temp_unit
@ -55,6 +56,6 @@ class TemperSensor(Entity):
""" Retrieve latest state. """
try:
self.current_value = self.temper_device.get_temperature()
except Exception:
except IOError:
_LOGGER.error('Failed to get temperature due to insufficient '
'permissions. Try running with "sudo"')

View File

@ -91,3 +91,6 @@ pywemo>=0.1
# Wink (*.wink)
https://github.com/balloob/python-wink/archive/master.zip#pywink>=0.1
# Temper sensors
https://github.com/rkabadi/temper-python/archive/master.zip