Raise exception instead of assert...

This commit is contained in:
Valentin Lorentz 2020-03-21 02:20:59 +01:00
parent 487897e7cc
commit de77ce6ddc
1 changed files with 1 additions and 1 deletions

View File

@ -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)