Skip hidden files in generator.py (#2183)

This commit is contained in:
Aleksey Shvayka 2019-05-29 17:58:53 +03:00 committed by Leo Balter
parent 35dc11f569
commit a8d4eefa85
1 changed files with 7 additions and 1 deletions

View File

@ -30,7 +30,13 @@ def find_cases(location):
return None, [location]
else:
return None, map(
lambda x: os.path.join(args.cases, x), os.listdir(args.cases))
lambda x: os.path.join(args.cases, x),
filter(
# skip hidden files on Unix, such as ".DS_Store" on Mac
lambda x: not x.startswith('.'),
os.listdir(args.cases)
)
)
def clean(args):
for (subdir, _, fileNames) in os.walk(args.directory):