diff options
Diffstat (limited to 'release/scripts/modules/addon_utils.py')
-rw-r--r-- | release/scripts/modules/addon_utils.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/release/scripts/modules/addon_utils.py b/release/scripts/modules/addon_utils.py index 07f1dc618dc..cf74282d064 100644 --- a/release/scripts/modules/addon_utils.py +++ b/release/scripts/modules/addon_utils.py @@ -31,6 +31,8 @@ __all__ = ( import bpy as _bpy +error_duplicates = False + def paths(): # RELEASE SCRIPTS: official scripts distributed in Blender releases paths = _bpy.utils.script_paths("addons") @@ -47,8 +49,11 @@ def paths(): def modules(module_cache): + global error_duplicates import os + error_duplicates = False + path_list = paths() # fake module importing @@ -117,7 +122,12 @@ def modules(module_cache): modules_stale -= {mod_name} mod = module_cache.get(mod_name) if mod: - if mod.__time__ != os.path.getmtime(mod_path): + if mod.__file__ != mod_path: + print("multiple addons with the same name:\n %r\n %r" % + (mod.__file__, mod_path)) + error_duplicates = True + + elif mod.__time__ != os.path.getmtime(mod_path): print("reloading addon:", mod_name, mod.__time__, os.path.getmtime(mod_path), mod_path) del module_cache[mod_name] mod = None |