forked from platypush/platypush
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:
parent
abe80db47e
commit
8759dafa0e
1 changed files with 1 additions and 10 deletions
|
@ -309,16 +309,7 @@ class MusicMpdPlugin(MusicPlugin):
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
retries = 0
|
|
||||||
max_retries = 2
|
|
||||||
|
|
||||||
while retries < max_retries:
|
|
||||||
try:
|
|
||||||
return self.client.status()
|
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):
|
||||||
|
|
Loading…
Reference in a new issue