From 21b2b907fd06a092a864b15d8099551b7042d2cf Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 27 Oct 2023 11:43:23 +0800 Subject: [PATCH] bugfix --- ahserver/loadplugins.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ahserver/loadplugins.py b/ahserver/loadplugins.py index 01ce28f..0ba6bde 100644 --- a/ahserver/loadplugins.py +++ b/ahserver/loadplugins.py @@ -4,6 +4,9 @@ import sys from appPublic.folderUtils import listFile from appPublic.ExecFile import ExecFile from ahserver.serverenv import ServerEnv +import appPublic +import sqlor +import ahserver def load_plugins(p_dir): ef = ExecFile() @@ -15,8 +18,11 @@ def load_plugins(p_dir): ef.set('sys',sys) ef.set('ServerEnv', ServerEnv) for m in listFile(pdir, suffixs='.py'): - if m.endswith('__init__.py'): + if m == '__init__.py': continue + if not m.endswith('.py'): + continue + print(f'{m=}') module = os.path.basename(m[:-3]) print('module=', module) __import__(module, locals(), globals())