mirror of
https://github.com/home-assistant/core.git
synced 2025-08-11 00:25:12 +02:00
Coding style fixes
This commit is contained in:
@@ -124,8 +124,7 @@ class UbusDeviceScanner(object):
|
|||||||
if not self.hostapd:
|
if not self.hostapd:
|
||||||
hostapd = _req_json_rpc(self.url, self.session_id,
|
hostapd = _req_json_rpc(self.url, self.session_id,
|
||||||
'list', 'hostapd.*', '')
|
'list', 'hostapd.*', '')
|
||||||
for key in hostapd.keys():
|
self.hostapd.extend(hostapd.keys())
|
||||||
self.hostapd.append(key)
|
|
||||||
|
|
||||||
self.last_results = []
|
self.last_results = []
|
||||||
results = 0
|
results = 0
|
||||||
@@ -135,14 +134,9 @@ class UbusDeviceScanner(object):
|
|||||||
|
|
||||||
if result:
|
if result:
|
||||||
results = results + 1
|
results = results + 1
|
||||||
for key in result["clients"].keys():
|
self.last_results.extend(result['clients'].keys())
|
||||||
self.last_results.append(key)
|
|
||||||
|
|
||||||
if results:
|
|
||||||
return True
|
|
||||||
else:
|
|
||||||
return False
|
|
||||||
|
|
||||||
|
return bool(results)
|
||||||
|
|
||||||
def _req_json_rpc(url, session_id, rpcmethod, subsystem, method, **params):
|
def _req_json_rpc(url, session_id, rpcmethod, subsystem, method, **params):
|
||||||
""" Perform one JSON RPC operation. """
|
""" Perform one JSON RPC operation. """
|
||||||
|
Reference in New Issue
Block a user