mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +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:
|
||||
hostapd = _req_json_rpc(self.url, self.session_id,
|
||||
'list', 'hostapd.*', '')
|
||||
for key in hostapd.keys():
|
||||
self.hostapd.append(key)
|
||||
self.hostapd.extend(hostapd.keys())
|
||||
|
||||
self.last_results = []
|
||||
results = 0
|
||||
@ -135,14 +134,9 @@ class UbusDeviceScanner(object):
|
||||
|
||||
if result:
|
||||
results = results + 1
|
||||
for key in result["clients"].keys():
|
||||
self.last_results.append(key)
|
||||
|
||||
if results:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
self.last_results.extend(result['clients'].keys())
|
||||
|
||||
return bool(results)
|
||||
|
||||
def _req_json_rpc(url, session_id, rpcmethod, subsystem, method, **params):
|
||||
""" Perform one JSON RPC operation. """
|
||||
|
Loading…
x
Reference in New Issue
Block a user