Skip to content

Commit 856fbc5

Browse files
authored
Merge pull request #31 from jabdoa2/patch-1
Fix crash when wifi interface is down
2 parents 7c1f4c1 + 8072103 commit 856fbc5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

custom_components/openwrt/coordinator.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ async def discover_wireless(self) -> dict:
5555
if item.get('disabled', False):
5656
continue
5757
for iface in item['interfaces']:
58+
if 'ifname' not in iface:
59+
continue
5860
conf = dict(ifname=iface['ifname'],
5961
network=iface['config']['network'][0])
6062
if iface['config']['mode'] == 'ap':

0 commit comments

Comments
 (0)