diff --git a/tasks/linter.py b/tasks/linter.py index a2a41e29cb8c0..10aa5af3b9ef6 100644 --- a/tasks/linter.py +++ b/tasks/linter.py @@ -613,7 +613,9 @@ def contains_valid_change_rule(rule): tests_without_change_path = defaultdict(list) tests_without_change_path_allowed = defaultdict(list) for test, filepath in tests: - if not any(contains_valid_change_rule(rule) for rule in config[test]['rules'] if isinstance(rule, dict)): + if "rules" in config[test] and not any( + contains_valid_change_rule(rule) for rule in config[test]['rules'] if isinstance(rule, dict) + ): if test in tests_without_change_path_allow_list: tests_without_change_path_allowed[filepath].append(test) else: