forked from platypush/platypush
Don't throw the exception if a certain Snapcast host is not reachable
This commit is contained in:
parent
29be2945cc
commit
33fd226fa1
1 changed files with 22 additions and 17 deletions
|
@ -569,6 +569,7 @@ class MusicSnapcastPlugin(Plugin):
|
||||||
playing_hosts = {}
|
playing_hosts = {}
|
||||||
|
|
||||||
def _worker(host, port):
|
def _worker(host, port):
|
||||||
|
try:
|
||||||
if exclude_local and (host == 'localhost'
|
if exclude_local and (host == 'localhost'
|
||||||
or host == Config.get('device_id')):
|
or host == Config.get('device_id')):
|
||||||
return
|
return
|
||||||
|
@ -593,6 +594,10 @@ class MusicSnapcastPlugin(Plugin):
|
||||||
return
|
return
|
||||||
|
|
||||||
playing_hosts[host] = port
|
playing_hosts[host] = port
|
||||||
|
except Exception as e:
|
||||||
|
self.logger.warning(('Error while retrieving the status of ' +
|
||||||
|
'Snapcast host at {}:{}: {}').format(
|
||||||
|
host, port, str(e)))
|
||||||
|
|
||||||
workers = []
|
workers = []
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue