summaryrefslogtreecommitdiff
path: root/plugin_loader/loader.py
diff options
context:
space:
mode:
authortza <marios8543@gmail.com>2022-04-06 12:53:19 +0300
committertza <marios8543@gmail.com>2022-04-06 12:53:19 +0300
commita6943dd7a25d0d787308897f6f55d44e89c216cf (patch)
tree5cc3023cd71fa97a79fe5f7f8a73cadfef05253b /plugin_loader/loader.py
parent85e5554c05a60b701fd69fabe47e74fb83ebfd68 (diff)
downloaddecky-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.py3
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()