diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-01-12 13:04:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-01-12 13:04:03 +0300 |
commit | f6c79c553b8ac512ff5bd394b956a0a8d0ff27a8 (patch) | |
tree | a5bdd55a80ab4f48c7922563c4456ebf10ef101f /release/scripts/modules/bpy/__init__.py | |
parent | b76551da68d6bc35d606cff6594df853cfee3234 (diff) |
[#20646] 2.5 does not load python scripts with multiple dots in the filename
- not a bug so add a warning if people add scripts with invalid names like this.
Diffstat (limited to 'release/scripts/modules/bpy/__init__.py')
-rw-r--r-- | release/scripts/modules/bpy/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/release/scripts/modules/bpy/__init__.py b/release/scripts/modules/bpy/__init__.py index 6209cbe4f0e..c760268d6f7 100644 --- a/release/scripts/modules/bpy/__init__.py +++ b/release/scripts/modules/bpy/__init__.py @@ -47,6 +47,10 @@ def load_scripts(reload_scripts=False): t_main = time.time() def test_import(module_name): + if "." in module_name: + print("Ignoring '%s', can't import files containing multiple periods." % module_name) + return None + try: t = time.time() ret = __import__(module_name) |