fix: 修复网页控制台设置页面保存报错
This commit is contained in:
parent
7da80594e3
commit
202105a11f
@ -1051,6 +1051,7 @@ class XiaoMusic:
|
||||
async def getalldevices(self, **kwargs):
|
||||
did_list = []
|
||||
hardware_list = []
|
||||
try:
|
||||
hardware_data = await self.mina_service.device_list()
|
||||
for h in hardware_data:
|
||||
did = h.get("miotDID", "")
|
||||
@ -1059,6 +1060,8 @@ class XiaoMusic:
|
||||
hardware = h.get("hardware", "")
|
||||
if h.get("hardware", "") != "":
|
||||
hardware_list.append(hardware)
|
||||
except Exception as e:
|
||||
self.log.error(f"Execption {e}")
|
||||
alldevices = {
|
||||
"did_list": did_list,
|
||||
"hardware_list": hardware_list,
|
||||
|
Loading…
Reference in New Issue
Block a user