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

Komponente Checks & agents
Titel fileinfo: Fix crash for user-configured state in case of missing file
Datum 31.05.2022
Checkmk Edition Checkmk Raw (CRE)
Checkmk-Version 2.1.0p2 2.2.0b1
Level Kleine Änderung
Klasse Bugfix
Kompatibilität Kompatibel - benötigt kein manuelles Eingreifen

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.

Zur Liste aller Werks