From de77ce6ddc66187ef02c32f1d7cf8512d3cbafa0 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Sat, 21 Mar 2020 02:20:59 +0100 Subject: [PATCH] Raise exception instead of assert... --- src/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugin.py b/src/plugin.py index 78abfb0fc..63555090a 100644 --- a/src/plugin.py +++ b/src/plugin.py @@ -73,7 +73,7 @@ def loadPluginModule(name, ignoreDeprecation=False): # spec is None if 'name' can't be found; and # spec.loader might be None in some rare occasions as well # (eg. for namespace packages) - assert ImportError(name) + raise ImportError(name) module = importlib.util.module_from_spec(spec) sys.modules[module.__name__] = module spec.loader.exec_module(module)