This commit is contained in:
Paulus Schoutsen 2017-07-28 20:53:15 -07:00
parent 0a6d519b9d
commit 828c469ef7

View File

@ -80,7 +80,7 @@ class UbusDeviceScanner(DeviceScanner):
return self.last_results return self.last_results
@_refresh_on_acccess_denied @_refresh_on_acccess_denied
def get_device_name(self, device): def get_device_name(self, mac):
"""Return the name of the given device or None if we don't know.""" """Return the name of the given device or None if we don't know."""
if self.leasefile is None: if self.leasefile is None:
result = _req_json_rpc( result = _req_json_rpc(
@ -105,10 +105,9 @@ class UbusDeviceScanner(DeviceScanner):
# Error, handled in the _req_json_rpc # Error, handled in the _req_json_rpc
return return
return self.mac2name.get(device.upper(), None) return self.mac2name.get(mac.upper(), None)
@_refresh_on_acccess_denied @_refresh_on_acccess_denied
@Throttle(MIN_TIME_BETWEEN_SCANS)
def _update_info(self): def _update_info(self):
"""Ensure the information from the Luci router is up to date. """Ensure the information from the Luci router is up to date.