From 673351db51674cf8e1b598c6ef1b1b832f53c79a Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 3 Feb 2021 17:43:26 +0100 Subject: [PATCH] Don't fail if a media plugin can't be imported --- platypush/plugins/media/ctrl.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platypush/plugins/media/ctrl.py b/platypush/plugins/media/ctrl.py index d24f3892c..117b0691a 100644 --- a/platypush/plugins/media/ctrl.py +++ b/platypush/plugins/media/ctrl.py @@ -65,7 +65,11 @@ class MediaCtrlPlugin(Plugin): ] if configured_media_plugins: - plugin = get_plugin(configured_media_plugins[0]) + try: + plugin = get_plugin(configured_media_plugins[0]) + except: + pass + status = plugin.status().output if status.get('state') == PlayerState.PLAY.value or status.get('state') == PlayerState.PAUSE.value: return plugin