forked from platypush/platypush
The whole get_plugin/.status() block should be under try/except
This commit is contained in:
parent
673351db51
commit
346bd9602d
1 changed files with 2 additions and 2 deletions
|
@ -67,10 +67,10 @@ class MediaCtrlPlugin(Plugin):
|
||||||
if configured_media_plugins:
|
if configured_media_plugins:
|
||||||
try:
|
try:
|
||||||
plugin = get_plugin(configured_media_plugins[0])
|
plugin = get_plugin(configured_media_plugins[0])
|
||||||
|
status = plugin.status().output
|
||||||
except:
|
except:
|
||||||
pass
|
continue
|
||||||
|
|
||||||
status = plugin.status().output
|
|
||||||
if status.get('state') == PlayerState.PLAY.value or status.get('state') == PlayerState.PAUSE.value:
|
if status.get('state') == PlayerState.PLAY.value or status.get('state') == PlayerState.PAUSE.value:
|
||||||
return plugin
|
return plugin
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue