From a2bc22c37dcd8e2658006a9629f9357e85819a37 Mon Sep 17 00:00:00 2001 From: 13476573407 <1062424570@qq.com> Date: Mon, 18 Mar 2024 14:40:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B1=E4=BA=8E=E4=BD=BF=E7=94=A8#scanp?= =?UTF-8?q?=E5=92=8C#reloadp=E6=89=AB=E6=8F=8F=E6=8F=92=E4=BB=B6=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=BD=93=E6=9B=B4=E6=96=B0=E6=8F=92=E4=BB=B6=E4=BB=A5?= =?UTF-8?q?=E5=90=8E=E5=B9=B6=E4=B8=8D=E4=BC=9A=E5=AE=9E=E7=8E=B0=E9=87=8D?= =?UTF-8?q?=E8=BD=BD=E6=96=B0=E7=9A=84=E6=8F=92=E4=BB=B6=20=E6=89=80?= =?UTF-8?q?=E4=BB=A5=E5=8F=96=E6=B6=88=E4=BA=86=E5=B7=B2=E8=BD=BD=E5=85=A5?= =?UTF-8?q?=E7=9A=84=E6=8F=92=E4=BB=B6=E5=88=A4=E6=96=AD=E9=87=8D=E8=BD=BD?= =?UTF-8?q?=E9=99=A4Godcmd=E4=BB=A5=E5=A4=96=E7=9A=84=E6=89=80=E6=9C=89?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E6=9D=A5=E5=AE=9E=E7=8E=B0=E4=B8=8D=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E9=87=8D=E5=90=AF=E9=A1=B9=E7=9B=AE=E5=8D=B3=E5=8F=AF?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/plugin_manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/plugin_manager.py b/plugins/plugin_manager.py index 49c13ca..8433e8f 100644 --- a/plugins/plugin_manager.py +++ b/plugins/plugin_manager.py @@ -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: