Tests: fix incorrect check for hidden dir

Copy-pasted mistake in tests and tools.
This commit is contained in:
Campbell Barton 2017-08-23 15:36:39 +10:00 committed by Bastien Montagne
parent 6692af3997
commit e00f3a6565
6 changed files with 11 additions and 22 deletions

View File

@ -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):

View File

@ -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)

View 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):

View 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):

View 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)

View 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)