Fix 3621 (#3642)
Happens when the scanner searches for a mac address, that has been forgotten by the fritzbox.
This commit is contained in:
parent
194402f7e7
commit
c93b63963b
1 changed files with 3 additions and 1 deletions
|
@ -85,7 +85,9 @@ class FritzBoxScanner(object):
|
||||||
|
|
||||||
def get_device_name(self, mac):
|
def get_device_name(self, mac):
|
||||||
"""Return the name of the given device or None if is not known."""
|
"""Return the name of the given device or None if is not known."""
|
||||||
ret = self.fritz_box.get_specific_host_entry(mac)['NewHostName']
|
ret = self.fritz_box.get_specific_host_entry(mac).get(
|
||||||
|
'NewHostName'
|
||||||
|
)
|
||||||
if ret == {}:
|
if ret == {}:
|
||||||
return None
|
return None
|
||||||
return ret
|
return ret
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue