From 1911168855c4e04979a09fbb64c38e8645301e2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Fri, 10 Aug 2018 17:09:08 +0300 Subject: [PATCH] Misc cleanups (#15907) * device_tracker.huawei_router: Pylint logging-not-lazy fix * sensor.irish_rail_transport: Clean up redundant self.info test --- homeassistant/components/device_tracker/huawei_router.py | 3 +-- homeassistant/components/sensor/irish_rail_transport.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/device_tracker/huawei_router.py b/homeassistant/components/device_tracker/huawei_router.py index 804269e6228..f5e4fa8a714 100644 --- a/homeassistant/components/device_tracker/huawei_router.py +++ b/homeassistant/components/device_tracker/huawei_router.py @@ -85,8 +85,7 @@ class HuaweiDeviceScanner(DeviceScanner): active_clients = [client for client in data if client.state] self.last_results = active_clients - # pylint: disable=logging-not-lazy - _LOGGER.debug("Active clients: " + "\n" + _LOGGER.debug("Active clients: %s", "\n" .join((client.mac + " " + client.name) for client in active_clients)) return True diff --git a/homeassistant/components/sensor/irish_rail_transport.py b/homeassistant/components/sensor/irish_rail_transport.py index 5febebeec87..38fd910260a 100644 --- a/homeassistant/components/sensor/irish_rail_transport.py +++ b/homeassistant/components/sensor/irish_rail_transport.py @@ -164,7 +164,7 @@ class IrishRailTransportData: ATTR_TRAIN_TYPE: train.get('type')} self.info.append(train_data) - if not self.info or not self.info: + if not self.info: self.info = self._empty_train_data() def _empty_train_data(self):