Cleanup: tweak logic for skipping modules
Startup is the special case, so match against this instead of 'modules'.
This commit is contained in:
@@ -254,10 +254,8 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
|
|||||||
if _os.path.isdir(path):
|
if _os.path.isdir(path):
|
||||||
_sys_path_ensure(path)
|
_sys_path_ensure(path)
|
||||||
|
|
||||||
# only add this to sys.modules, don't run
|
# Only add to 'sys.modules' unless this is 'startup'.
|
||||||
if path_subdir == "modules":
|
if path_subdir == "startup":
|
||||||
continue
|
|
||||||
|
|
||||||
for mod in modules_from_path(path, loaded_modules):
|
for mod in modules_from_path(path, loaded_modules):
|
||||||
test_register(mod)
|
test_register(mod)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user