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
1 changed files with 1 additions and 10 deletions

View File

@ -309,16 +309,7 @@ class MusicMpdPlugin(MusicPlugin):
}
"""
retries = 0
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)
return self.client.status()
@action
def currentsong(self):