Tests: fix incorrect check for hidden dir
authorCampbell Barton <ideasman42@gmail.com>
Wed, 23 Aug 2017 05:36:39 +0000 (15:36 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 23 Aug 2017 05:36:39 +0000 (15:36 +1000)
Copy-pasted mistake in tests and tools.

build_files/cmake/cmake_consistency_check.py
build_files/cmake/project_info.py
tests/check_deprecated.py
tests/python/batch_import.py
tests/python/bl_load_py_modules.py
tests/python/bl_run_operators.py

index 3d06790758aba70f792c5a899edcef475ea410b5..443657532decda7f367aab0cc46fc1207131bc1c 100755 (executable)
@@ -61,10 +61,8 @@ def replace_line(f, i, text, keep_indent=True):
 
 def source_list(path, filename_check=None):
     for dirpath, dirnames, filenames in os.walk(path):
-
         # skip '.git'
-        if dirpath.startswith("."):
-            continue
+        dirnames[:] = [d for d in dirnames if not d.startswith(".")]
 
         for filename in filenames:
             if filename_check is None or filename_check(filename):
index 3ac4c4c9480f041f53280d3f599847ab6e743417..9b0905da030931637de493a1e0e8cf5a5b07d44b 100755 (executable)
@@ -84,10 +84,8 @@ def init(cmake_path):
 
 def source_list(path, filename_check=None):
     for dirpath, dirnames, filenames in os.walk(path):
-
-        # skip '.svn'
-        if dirpath.startswith("."):
-            continue
+        # skip '.git'
+        dirnames[:] = [d for d in dirnames if not d.startswith(".")]
 
         for filename in filenames:
             filepath = join(dirpath, filename)
index cf8f8e0cc354d64163c6796ce3df097c4a1c9073..6e07f8fdb31f4a04bc3e1e1a535ef220dbd0a0f0 100644 (file)
@@ -53,10 +53,8 @@ def is_source_any(filename):
 
 def source_list(path, filename_check=None):
     for dirpath, dirnames, filenames in os.walk(path):
-
-        # skip '.svn'
-        if dirpath.startswith("."):
-            continue
+        # skip '.git'
+        dirnames[:] = [d for d in dirnames if not d.startswith(".")]
 
         for filename in filenames:
             if filename_check is None or filename_check(filename):
index bbe3a70327f61f7ab55ff4eff5e603bc2635ed8d..a6e2469349bdccdc4ca3254b35a2ac945ea552a3 100644 (file)
@@ -72,10 +72,8 @@ def batch_import(
 
     def file_generator(path):
         for dirpath, dirnames, filenames in os.walk(path):
-
-            # skip '.svn'
-            if dirpath.startswith("."):
-                continue
+            # skip '.git'
+            dirnames[:] = [d for d in dirnames if not d.startswith(".")]
 
             for filename in filenames:
                 if pattern_match(filename):
index 2d8a908406f923c96e174d93ba7211d03824ae18..39e7bd33d447c9721c489c0e40790bd1e914e56e 100644 (file)
@@ -93,9 +93,8 @@ def addon_modules_sorted():
 def source_list(path, filename_check=None):
     from os.path import join
     for dirpath, dirnames, filenames in os.walk(path):
-        # skip '.svn'
-        if dirpath.startswith("."):
-            continue
+        # skip '.git'
+        dirnames[:] = [d for d in dirnames if not d.startswith(".")]
 
         for filename in filenames:
             filepath = join(dirpath, filename)
index 7d5f4127378eadaa04e730b8e81480da33cdddc0..7b6b97e5ad1d7c38dd3e513093e0ecaa7ad51ed7 100644 (file)
@@ -100,10 +100,8 @@ def blend_list(mainpath):
 
     def file_list(path, filename_check=None):
         for dirpath, dirnames, filenames in os.walk(path):
-
-            # skip '.svn'
-            if dirpath.startswith("."):
-                continue
+            # skip '.git'
+            dirnames[:] = [d for d in dirnames if not d.startswith(".")]
 
             for filename in filenames:
                 filepath = join(dirpath, filename)