Update server.py
This commit is contained in:
parent
bf60fada13
commit
e483cee7cf
1 changed files with 3 additions and 1 deletions
|
@ -88,7 +88,9 @@ for mod in modules:
|
||||||
i = os.path.dirname(__file__) + "/modules/" + i
|
i = os.path.dirname(__file__) + "/modules/" + i
|
||||||
try:
|
try:
|
||||||
print(f"Importing module {mod}...")
|
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 temp_module.__ircat_type__ == "sql.provider":
|
||||||
if modules["sql_provider"] != None:
|
if modules["sql_provider"] != None:
|
||||||
modules["sql_provider"] = temp_module
|
modules["sql_provider"] = temp_module
|
||||||
|
|
Loading…
Reference in a new issue