Skip to content

Commit

Permalink
Fix generator clean fail on .DS_Store
Browse files Browse the repository at this point in the history
  • Loading branch information
legendecas authored and rwaldron committed May 5, 2022
1 parent d6b5b13 commit 2e7cdfb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tools/generation/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
from lib.expander import Expander
from lib.test import Test

# base name of the files to be ignored
ignored_files = [
'.DS_Store',
]

def print_error(*values):
print('ERROR:', *values, file=sys.stderr)

Expand All @@ -35,6 +40,8 @@ def find_cases(location):
def clean(args):
for (subdir, _, fileNames) in os.walk(args.directory):
for fileName in map(lambda x: os.path.join(subdir, x), fileNames):
if os.path.basename(fileName) in ignored_files:
continue
test = Test(fileName)
test.load()
if test.is_generated():
Expand Down

0 comments on commit 2e7cdfb

Please sign in to comment.