Skip to content

Commit c42c7b1

Browse files
committed
Check if codebase section exists in analysis file
Previously we assumed it was present, even though it is optional. Signed-off-by: John Pennycook <john.pennycook@intel.com>
1 parent 7bf04f6 commit c42c7b1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

bin/codebasin

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,10 @@ def main():
267267
except BaseException:
268268
raise ValueError("Analysis file failed validation")
269269

270-
if "exclude" in analysis_toml["codebase"]:
271-
excludes = analysis_toml["codebase"]["exclude"]
272-
codebase["exclude_patterns"] += excludes
270+
if "codebase" in analysis_toml:
271+
if "exclude" in analysis_toml["codebase"]:
272+
excludes = analysis_toml["codebase"]["exclude"]
273+
codebase["exclude_patterns"] += excludes
273274

274275
for name in analysis_toml["platform"].keys():
275276
if filtered_platforms and name not in filtered_platforms:

0 commit comments

Comments
 (0)