mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 06:07:17 +00:00
Merge pull request #507 from gsabbe/dev
asuswrt gives a traceback when ipv6 is enabled on the router
This commit is contained in:
commit
c2117b3eaf
@ -161,6 +161,7 @@ class AsusWrtDeviceScanner(object):
|
|||||||
# For leases where the client doesn't set a hostname, ensure
|
# For leases where the client doesn't set a hostname, ensure
|
||||||
# it is blank and not '*', which breaks the entity_id down
|
# it is blank and not '*', which breaks the entity_id down
|
||||||
# the line
|
# the line
|
||||||
|
if match:
|
||||||
host = match.group('host')
|
host = match.group('host')
|
||||||
if host == '*':
|
if host == '*':
|
||||||
host = ''
|
host = ''
|
||||||
@ -174,6 +175,6 @@ class AsusWrtDeviceScanner(object):
|
|||||||
|
|
||||||
for neighbor in neighbors:
|
for neighbor in neighbors:
|
||||||
match = _IP_NEIGH_REGEX.search(neighbor.decode('utf-8'))
|
match = _IP_NEIGH_REGEX.search(neighbor.decode('utf-8'))
|
||||||
if match.group('ip') in devices:
|
if match and match.group('ip') in devices:
|
||||||
devices[match.group('ip')]['status'] = match.group('status')
|
devices[match.group('ip')]['status'] = match.group('status')
|
||||||
return devices
|
return devices
|
||||||
|
Loading…
x
Reference in New Issue
Block a user