From e58584265122e5b85903f109ac3458c3f78ccbb9 Mon Sep 17 00:00:00 2001 From: Nathan Vegdahl <cessen@cessen.com> Date: Thu, 18 Nov 2010 00:50:02 +0000 Subject: [PATCH] Check for '.' in rigify rig types was preventing *.py files from being loaded. --- rigify/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rigify/__init__.py b/rigify/__init__.py index 98a807bdc..2db7c8083 100644 --- a/rigify/__init__.py +++ b/rigify/__init__.py @@ -51,13 +51,13 @@ def get_rig_list(path): files.sort() for f in files: + is_dir = os.path.isdir(os.path.join(SEARCH_DIR_ABS, f)) # Whether the file is a directory if f[0] in (".", "_"): pass - elif "." in f: + elif f.count(".") >= 2 or (is_dir and "." in f): print("Warning: %r, filename contains a '.', skipping" % os.path.join(SEARCH_DIR_ABS, f)) else: - f_abs = os.path.join(SEARCH_DIR_ABS, f) - if os.path.isdir(f_abs): + if is_dir: # Check directories module_name = os.path.join(path, f).replace(os.sep, ".") try: -- GitLab