Coding style fixes

This commit is contained in:
Krzysztof Koziarek 2015-10-26 11:32:00 +01:00
parent 50fbd83b3d
commit c9f1dce6a2

View File

@ -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. """