From d76fdc8a73431c77ad955c57865aaec3fd1a423f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B4=9B=E6=B0=B4=E5=B1=85=E5=AE=A4?= Date: Wed, 27 Jul 2022 00:18:10 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=E6=94=AF=E6=8C=81=E4=BB=A5?= =?UTF-8?q?=E8=BD=AF=E4=BB=B6=E5=8C=85=E7=9A=84=E6=96=B9=E5=BC=8F=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/plugins/manager.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils/plugins/manager.py b/utils/plugins/manager.py index f4016fe..98a82b8 100644 --- a/utils/plugins/manager.py +++ b/utils/plugins/manager.py @@ -34,6 +34,10 @@ class PluginsManager: for plugin_path in plugin_paths: if plugin_path.startswith('__'): continue + if os.path.isdir(plugin_path): + plugin_path = os.path.basename(plugin_path) + self.plugin_list.append(plugin_path) + continue module_name = path.basename(path.normpath(plugin_path)) root, ext = os.path.splitext(module_name) if ext == ".py":