async_query returns False if connection to server failed, handle this properly (#9070)
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…
Reference in New Issue