Let plugin fail if unable to retrieve the status, so it can rely on the automatic reload mechanism instead of swallowing the error

This commit is contained in:
Fabio Manganiello 2019-01-10 17:28:49 +01:00
parent abe80db47e
commit 8759dafa0e

View file

@ -309,16 +309,7 @@ class MusicMpdPlugin(MusicPlugin):
} }
""" """
retries = 0 return self.client.status()
max_retries = 2
while retries < max_retries:
try:
return self.client.status()
except Exception as e:
self.logger.warning('Unable to parse mpd status: {}'.format(e))
retries += 1
time.sleep(1)
@action @action
def currentsong(self): def currentsong(self):