mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
.
This commit is contained in:
parent
242fe10404
commit
b880bfadaa
1 changed files with 21 additions and 20 deletions
|
|
@ -53,6 +53,7 @@ def load_legacy_plugin(plugin, plugin_paths):
|
||||||
spec = importlib.util.find_spec(plugin)
|
spec = importlib.util.find_spec(plugin)
|
||||||
if spec is None:
|
if spec is None:
|
||||||
raise ImportError('Cannot import plugin `{}`'.format(plugin))
|
raise ImportError('Cannot import plugin `{}`'.format(plugin))
|
||||||
|
else:
|
||||||
# Avoid loading the same plugin twice
|
# Avoid loading the same plugin twice
|
||||||
if spec.name in sys.modules:
|
if spec.name in sys.modules:
|
||||||
return sys.modules[spec.name]
|
return sys.modules[spec.name]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue