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): | |||
| 156 | RecipeHandler.recipebinmap[prog] = pn | 156 | RecipeHandler.recipebinmap[prog] = pn |
| 157 | 157 | ||
| 158 | @staticmethod | 158 | @staticmethod |
| 159 | def checkfiles(path, speclist, recursive=False): | 159 | def checkfiles(path, speclist, recursive=False, excludedirs=None): |
| 160 | results = [] | 160 | results = [] |
| 161 | if recursive: | 161 | if recursive: |
| 162 | for root, _, files in os.walk(path): | 162 | for root, dirs, files in os.walk(path, topdown=True): |
| 163 | if excludedirs: | ||
| 164 | dirs[:] = [d for d in dirs if d not in excludedirs] | ||
| 163 | for fn in files: | 165 | for fn in files: |
| 164 | for spec in speclist: | 166 | for spec in speclist: |
| 165 | if fnmatch.fnmatch(fn, spec): | 167 | if fnmatch.fnmatch(fn, spec): |
