From 077bb0686b6e34cbb4c7d1136ff1af8bcc26a37d Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Thu, 7 Feb 2019 09:05:22 +0100 Subject: [PATCH] Don't break if no data is received from the Snapcast server --- platypush/plugins/music/snapcast.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platypush/plugins/music/snapcast.py b/platypush/plugins/music/snapcast.py index b103020a..9c227f4a 100644 --- a/platypush/plugins/music/snapcast.py +++ b/platypush/plugins/music/snapcast.py @@ -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):