Don't break if no data is received from the Snapcast server

This commit is contained in:
Fabio Manganiello 2019-02-07 09:05:22 +01:00
parent affaee6ab7
commit 077bb0686b

View file

@ -97,7 +97,7 @@ class MusicSnapcastPlugin(Plugin):
}
self._send(sock, request)
return self._recv(sock).get('server', {})
return (self._recv(sock) or {}).get('server', {})
@action
def status(self, host=None, port=None, client=None, group=None):