Look for huawei_lte device MACs in a few more device info attributes (#74795)

pull/74864/head
Ville Skyttä 2022-07-09 18:07:46 +03:00 committed by GitHub
parent 79b34090e8
commit 430d3e4604
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -14,7 +14,10 @@ def get_device_macs(
:param device_info: the device.information structure for the device
:param wlan_settings: the wlan.multi_basic_settings structure for the device
"""
macs = [device_info.get("MacAddress1"), device_info.get("MacAddress2")]
macs = [
device_info.get(x)
for x in ("MacAddress1", "MacAddress2", "WifiMacAddrWl0", "WifiMacAddrWl1")
]
try:
macs.extend(x.get("WifiMac") for x in wlan_settings["Ssids"]["Ssid"])
except Exception: # pylint: disable=broad-except