Commit a183ea4b authored by AUTOMATIC1111's avatar AUTOMATIC1111

undo adding scripts to sys.modules

parent e6a8d0b4
...@@ -2,7 +2,6 @@ import os ...@@ -2,7 +2,6 @@ import os
import importlib.util import importlib.util
from modules import errors from modules import errors
import sys
loaded_scripts = {} loaded_scripts = {}
...@@ -14,8 +13,8 @@ def load_module(path): ...@@ -14,8 +13,8 @@ def load_module(path):
module_spec = importlib.util.spec_from_file_location(full_module_name, path) module_spec = importlib.util.spec_from_file_location(full_module_name, path)
module = importlib.util.module_from_spec(module_spec) module = importlib.util.module_from_spec(module_spec)
module_spec.loader.exec_module(module) module_spec.loader.exec_module(module)
loaded_scripts[path] = module loaded_scripts[path] = module
sys.modules[full_module_name] = module
return module return module
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment