Skip to content

Commit

Permalink
PICARD-2354: Exec plugin module when loading
Browse files Browse the repository at this point in the history
  • Loading branch information
phw committed Dec 9, 2022
1 parent 7813493 commit fa36ca4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion picard/pluginmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ def _get_plugin_index_by_name(self, name):
return (None, None)

def _load_plugin_from_directory(self, name, plugindir):
module_file = None
info = None
zipfilename = os.path.join(plugindir, name + '.zip')
(zip_importer, module_name, manifest_data) = zip_import(zipfilename)
Expand Down Expand Up @@ -274,6 +273,8 @@ def _load_plugin_from_directory(self, name, plugindir):
plugin_module = zip_importer.load_module(full_module_name)
else:
plugin_module = importlib.util.module_from_spec(info)
info.loader.exec_module(plugin_module)

plugin = PluginWrapper(plugin_module, plugindir,
file=module_pathname, manifest_data=manifest_data)
compatible_versions = _compatible_api_versions(plugin.api_versions)
Expand Down

0 comments on commit fa36ca4

Please sign in to comment.