Skip to content

Commit 3d4d57f

Browse files
peteS-UKfrenck
authored andcommitted
Additional Fix error on startup when no Apps or Radio plugins are installed for Squeezebox (home-assistant#150475)
1 parent fed6f19 commit 3d4d57f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

homeassistant/components/squeezebox/browse_media.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ async def async_init(self, player: Player, browse_limit: int) -> None:
157157

158158
cmd = ["apps", 0, browse_limit]
159159
result = await player.async_query(*cmd)
160-
if result["appss_loop"]:
160+
if result and result.get("appss_loop"):
161161
for app in result["appss_loop"]:
162162
app_cmd = "app-" + app["cmd"]
163163
if app_cmd not in self.known_apps_radios:
@@ -169,7 +169,7 @@ async def async_init(self, player: Player, browse_limit: int) -> None:
169169
)
170170
cmd = ["radios", 0, browse_limit]
171171
result = await player.async_query(*cmd)
172-
if result["radioss_loop"]:
172+
if result and result.get("radioss_loop"):
173173
for app in result["radioss_loop"]:
174174
app_cmd = "app-" + app["cmd"]
175175
if app_cmd not in self.known_apps_radios:

0 commit comments

Comments
 (0)