Sfoglia il codice sorgente

由于使用#scanp和#reloadp扫描插件时,当更新插件以后并不会实现重载新的插件

所以取消了已载入的插件判断重载除Godcmd以外的所有插件来实现不需要重启项目即可更新插件
master
13476573407 8 mesi fa
parent
commit
a2bc22c37d
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. +2
    -2
      plugins/plugin_manager.py

+ 2
- 2
plugins/plugin_manager.py Vedi File

@@ -99,7 +99,7 @@ class PluginManager:
try:
self.current_plugin_path = plugin_path
if plugin_path in self.loaded:
if self.loaded[plugin_path] == None:
if plugin_name.upper() != 'GODCMD':
logger.info("reload module %s" % plugin_name)
self.loaded[plugin_path] = importlib.reload(sys.modules[import_path])
dependent_module_names = [name for name in sys.modules.keys() if name.startswith(import_path + ".")]
@@ -141,7 +141,7 @@ class PluginManager:
failed_plugins = []
for name, plugincls in self.plugins.items():
if plugincls.enabled:
if name not in self.instances:
# if name not in self.instances:
try:
instance = plugincls()
except Exception as e:


Loading…
Annulla
Salva