Update xtendr/xtendrsystem.py
This commit is contained in:
@@ -70,6 +70,12 @@ class XtendRSystem:
|
||||
except (ModuleNotFoundError, json.JSONDecodeError, AttributeError) as e:
|
||||
print(f"Failed to attach plugin '{name}': {e}")
|
||||
|
||||
def _pre_load(self, name: str):
|
||||
"""Pre-load data if needed"""
|
||||
if name in plugins:
|
||||
if self.plugins[name].use_pre_load: # Is pre-loading neccessary?
|
||||
self.plugins[name].pre_load()
|
||||
|
||||
def run(self, name: str, *args, **kwargs):
|
||||
"""Run the plugin's 'run' method if available."""
|
||||
if name in self.plugins:
|
||||
|
||||
Reference in New Issue
Block a user