6b96bc3859edc8e9588b7392b52515bcb8047635,homeassistant/components/device_tracker/ubus.py,UbusDeviceScanner,get_device_name,#UbusDeviceScanner#Any#,83
Before Change
else:
return
if self.mac2name is None:
result = _req_json_rpc(
self.url, self.session_id, "call", "file", "read",
path=self.leasefile)
if result:
self.mac2name = dict()
for line in result["data"].splitlines():
hosts = line.split(" ")
self.mac2name[hosts[1].upper()] = hosts[3]
else:
// Error, handled in the _req_json_rpc
return
return self.mac2name.get(mac.upper(), None)
@_refresh_on_acccess_denied
def _update_info(self):
After Change
@_refresh_on_acccess_denied
def get_device_name(self, mac):
Return the name of the given device or None if we don"t know.
if self.mac2name is None:
self._generate_mac2name()
name = self.mac2name.get(mac.upper(), None)
self.mac2name = None
return name
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: home-assistant/home-assistant
Commit Name: 6b96bc3859edc8e9588b7392b52515bcb8047635
Time: 2017-10-31
Author: storm+github@chemicalstorm.org
File Name: homeassistant/components/device_tracker/ubus.py
Class Name: UbusDeviceScanner
Method Name: get_device_name
Project Name: MolSSI/QCEngine
Commit Name: 0003e408505b4634961af84c1bd0f1503fe92f95
Time: 2020-07-30
Author: lori.burns@gmail.com
File Name: qcengine/programs/qchem.py
Class Name: QChemHarness
Method Name: get_version
Project Name: pantsbuild/pants
Commit Name: 7e7b2085856d74008dea3b7a2aecf84520658229
Time: 2020-12-21
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/util/objects.py
Class Name:
Method Name: get_docstring_summary