diff options
| author | tza <marios8543@gmail.com> | 2022-04-06 12:53:19 +0300 |
|---|---|---|
| committer | tza <marios8543@gmail.com> | 2022-04-06 12:53:19 +0300 |
| commit | a6943dd7a25d0d787308897f6f55d44e89c216cf (patch) | |
| tree | 5cc3023cd71fa97a79fe5f7f8a73cadfef05253b /plugin_loader/loader.py | |
| parent | 85e5554c05a60b701fd69fabe47e74fb83ebfd68 (diff) | |
| download | decky-loader-a6943dd7a25d0d787308897f6f55d44e89c216cf.tar.gz decky-loader-a6943dd7a25d0d787308897f6f55d44e89c216cf.zip | |
enabled logging, fixed loader refresh bug, removed template
Diffstat (limited to 'plugin_loader/loader.py')
| -rw-r--r-- | plugin_loader/loader.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugin_loader/loader.py b/plugin_loader/loader.py index 48776d51..8460c792 100644 --- a/plugin_loader/loader.py +++ b/plugin_loader/loader.py @@ -85,9 +85,10 @@ class Loader: if not hasattr(module.Plugin, "name"): raise KeyError("Plugin {} has not defined a name".format(file)) if module.Plugin.name in self.plugins: - if hasattr(module.Plugin, "hot_reload") and not module.Plugin.hot_reload: + if hasattr(module.Plugin, "hot_reload") and not module.Plugin.hot_reload and refresh: self.logger.info("Plugin {} is already loaded and has requested to not be re-loaded" .format(module.Plugin.name)) + return else: if hasattr(self.plugins[module.Plugin.name], "task"): self.plugins[module.Plugin.name].task.cancel() |
