Skip to content

Commit

Permalink
Misc cleanups (home-assistant#15907)
Browse files Browse the repository at this point in the history
* device_tracker.huawei_router: Pylint logging-not-lazy fix

* sensor.irish_rail_transport: Clean up redundant self.info test
  • Loading branch information
scop authored and Jacob Mansfield committed Sep 4, 2018
1 parent 5b8c4d0 commit 05fc2e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions homeassistant/components/device_tracker/huawei_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ def _update_info(self):
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
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/sensor/irish_rail_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def update(self):
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):
Expand Down

0 comments on commit 05fc2e5

Please sign in to comment.