Skip to content

Commit 91cb541

Browse files
committed
Reimplemented calling a plugin's load function.
1 parent faf9de1 commit 91cb541

File tree

1 file changed

+6
-0
lines changed
  • addons/source-python/packages/source-python/plugins

1 file changed

+6
-0
lines changed

addons/source-python/packages/source-python/plugins/manager.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ def __missing__(self, plugin_name):
6363
# Get the plugin's instance
6464
instance = self.instance(plugin_name, self.base_import)
6565

66+
# Does the plugin have a load function?
67+
if 'load' in instance.globals:
68+
69+
# Call the plugin's load function
70+
instance.globals['load']()
71+
6672
# Was the file not found?
6773
# We use this check because we already printed the error to console
6874
except PluginFileNotFoundError:

0 commit comments

Comments
 (0)