diff options
Diffstat (limited to 'source/tests/bl_load_py_modules.py')
-rw-r--r-- | source/tests/bl_load_py_modules.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/tests/bl_load_py_modules.py b/source/tests/bl_load_py_modules.py index 5a65578d8d3..a88edd5f1fe 100644 --- a/source/tests/bl_load_py_modules.py +++ b/source/tests/bl_load_py_modules.py @@ -65,6 +65,10 @@ def load_modules(): # paths blender stores scripts in. paths = bpy.utils.script_paths() + print("Paths:") + for script_path in paths: + print("\t'%s'" % script_path) + # # find all sys.path we added for script_path in paths: @@ -74,11 +78,18 @@ def load_modules(): # # collect modules from our paths. + module_names = set() for mod_dir in module_paths: # print("mod_dir", mod_dir) for mod, mod_full in bpy.path.module_names(mod_dir): + if mod in module_names: + raise Exception("Module found twice %r" % mod) + modules.append(__import__(mod)) + module_names.add(mod) + del module_names + # # now submodules for m in modules: |