Skip to content

Commit bbc6e2a

Browse files
committed
Allowing a list of exclude paths to be passed
1 parent 8cc6a58 commit bbc6e2a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tools/toolchains/__init__.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ def need_update(self, target, dependencies):
341341

342342
return False
343343

344-
def scan_resources(self, path, exclude_path=None):
344+
def scan_resources(self, path, exclude_paths=None):
345345
labels = self.get_labels()
346346
resources = Resources(path)
347347
self.has_config = False
@@ -367,9 +367,12 @@ def scan_resources(self, path, exclude_path=None):
367367

368368
should_exclude_path = False
369369

370-
if exclude_path:
371-
rel_path = relpath(dir_path, exclude_path)
372-
should_exclude_path = not (rel_path.startswith('..'))
370+
if exclude_paths:
371+
for exclude_path in exclude_paths:
372+
rel_path = relpath(dir_path, exclude_path)
373+
if not (rel_path.startswith('..')):
374+
should_exclude_path = True
375+
break
373376

374377
if ((should_exclude_path) or
375378
(d.startswith('.') or d in self.legacy_ignore_dirs) or

0 commit comments

Comments
 (0)