cli (base): catch all failure on plugin importing.

This commit is contained in:
Goffi 2024-05-31 11:22:10 +02:00
commit 3fc429a781

View file

@ -537,17 +537,17 @@ class LiberviaCli:
try:
module = import_module(module_path)
self.import_plugin_module(module, type_)
except ImportError as e:
self.disp(
_("Can't import {module_path} plugin, ignoring it: {e}")
.format(module_path=module_path, e=e),
error=True)
except exceptions.CancelError:
continue
except exceptions.MissingModule as e:
self.disp(_("Missing module for plugin {name}: {missing}".format(
name = module_path,
missing = e)), error=True)
except Exception as e:
self.disp(
_("Can't import {module_path} plugin, ignoring it: {e}")
.format(module_path=module_path, e=e),
error=True)
def import_plugin_module(self, module, type_):