From 4ef4aa2095db1a361d2d6070cf57aa20522ae9ae Mon Sep 17 00:00:00 2001 From: sfam Date: Fri, 28 Aug 2015 00:09:24 +0100 Subject: [PATCH] fix pylint warnings --- homeassistant/components/device_tracker/thomson.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/device_tracker/thomson.py b/homeassistant/components/device_tracker/thomson.py index a1ed9ff5f4b..ffe1a7f64c2 100644 --- a/homeassistant/components/device_tracker/thomson.py +++ b/homeassistant/components/device_tracker/thomson.py @@ -50,12 +50,13 @@ _LOGGER = logging.getLogger(__name__) _DEVICES_REGEX = re.compile( r'(?P(([0-9a-f]{2}[:-]){5}([0-9a-f]{2})))\s' + r'(?P([0-9]{1,3}[\.]){3}[0-9]{1,3})\s+' + - r'(?P([^\s]+))\s+' + - r'(?P([^\s]+))\s+' + - r'(?P([^\s]+))\s+' + - r'(?P([^\s]+))\s+' + + r'(?P([^\s]+))\s+' + + r'(?P([^\s]+))\s+' + + r'(?P([^\s]+))\s+' + + r'(?P([^\s]+))\s+' + r'(?P([^\s]+))') + # pylint: disable=unused-argument def get_scanner(hass, config): """ Validates config and returns a THOMSON scanner. """ @@ -95,7 +96,7 @@ class ThomsonDeviceScanner(object): return [client['mac'] for client in self.last_results] def get_device_name(self, device): - """ Returns the name of the given device + """ Returns the name of the given device or None if we don't know. """ if not self.last_results: return None @@ -116,7 +117,7 @@ class ThomsonDeviceScanner(object): data = self.get_thomson_data() if not data: return False - + # flag C stands for CONNECTED active_clients = [client for client in data.values() if client['status'].find('C') != -1]