diff options
Diffstat (limited to 'scripts/lib/recipetool/create.py')
-rw-r--r-- | scripts/lib/recipetool/create.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index 1532735ab8..055bdef436 100644 --- a/scripts/lib/recipetool/create.py +++ b/scripts/lib/recipetool/create.py @@ -156,10 +156,12 @@ class RecipeHandler(object): RecipeHandler.recipebinmap[prog] = pn @staticmethod - def checkfiles(path, speclist, recursive=False): + def checkfiles(path, speclist, recursive=False, excludedirs=None): results = [] if recursive: - for root, _, files in os.walk(path): + for root, dirs, files in os.walk(path, topdown=True): + if excludedirs: + dirs[:] = [d for d in dirs if d not in excludedirs] for fn in files: for spec in speclist: if fnmatch.fnmatch(fn, spec): |