mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Coding style fixes
This commit is contained in:
parent
50fbd83b3d
commit
c9f1dce6a2
@ -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. """
|
||||||
|
Loading…
x
Reference in New Issue
Block a user