forked from platypush/platypush
Wrapped MPD plugin reload logic to prevent the backend from crashing if the second initialization fails as well
This commit is contained in:
parent
ae7cd120d2
commit
fec684210c
1 changed files with 5 additions and 1 deletions
|
@ -62,7 +62,11 @@ class MusicMpdBackend(Backend):
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.logger.exception(e)
|
self.logger.exception(e)
|
||||||
self.logger.info('Reloading crashed MPD plugin')
|
self.logger.info('Reloading crashed MPD plugin')
|
||||||
plugin = get_plugin('music.mpd', reload=True)
|
try:
|
||||||
|
plugin = get_plugin('music.mpd', reload=True)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
time.sleep(self.poll_seconds)
|
time.sleep(self.poll_seconds)
|
||||||
|
|
||||||
if state != last_state:
|
if state != last_state:
|
||||||
|
|
Loading…
Reference in a new issue