diff --git a/yamllint/linter.py b/yamllint/linter.py index c639dbe8..73871e58 100644 --- a/yamllint/linter.py +++ b/yamllint/linter.py @@ -170,7 +170,7 @@ def process_comment(self, comment): for problem in cache: if not (disabled_for_line.is_disabled_by_directive(problem) or disabled.is_disabled_by_directive(problem)): - if conf.rules[problem.rule]["disable_after_first_occurence"]: + if conf.rules[problem.rule].get('disable_after_first_occurence', False): disabled.disable_by_force(problem) yield problem