mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 14:27:07 +00:00
async_query returns False if connection to server failed, handle this properly (#9070)
This commit is contained in:
parent
8ceeee032c
commit
398735c9be
@ -95,7 +95,8 @@ class LogitechMediaServer(object):
|
||||
"""Create a list of devices connected to LMS."""
|
||||
result = []
|
||||
data = yield from self.async_query('players', 'status')
|
||||
|
||||
if data is False:
|
||||
return result
|
||||
for players in data.get('players_loop', []):
|
||||
player = SqueezeBoxDevice(
|
||||
self, players['playerid'], players['name'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user