From e483cee7cfac29de78d42f3d848e328bb384c7fa Mon Sep 17 00:00:00 2001 From: swee Date: Wed, 8 Jan 2025 22:04:42 -0800 Subject: [PATCH] Update server.py --- server.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server.py b/server.py index 7c4ecb9..8f2cf79 100644 --- a/server.py +++ b/server.py @@ -88,7 +88,9 @@ for mod in modules: i = os.path.dirname(__file__) + "/modules/" + i try: print(f"Importing module {mod}...") - temp_module = importlib.util.module_from_spec(importlib.util.spec_from_file_location(mod, f"{i}.py")) + spc = importlib.util.spec_from_file_location(mod, f"{i}.py") + temp_module = importlib.util.module_from_spec(spc) + spc.loader.exec_module(temp_module) if temp_module.__ircat_type__ == "sql.provider": if modules["sql_provider"] != None: modules["sql_provider"] = temp_module