Werk #13988: fileinfo: Fix crash for user-configured state in case of missing file

Component Checks & agents
Title fileinfo: Fix crash for user-configured state in case of missing file
Date May 31, 2022
Checkmk Edition Checkmk Raw (CRE)
Checkmk Version 2.1.0p2 2.2.0b1
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed

The check plugin fileinfo reports UNKNOWN by default in case a file is missing. This behaviour is configurable via the option "State when file is missing" in the ruleset "Size and age of single files". However, if this option was used, the check plugin crashed with TypeError(f"'state' must be a checkmk State constant, got {state}") if the file was actually missing.

To the list of all Werks