Branch: refs/heads/master
Home:
https://github.com/tribe29/checkmk
Commit: 1d4d85f34a43fc6cf0b849d33176298cdd519426
https://github.com/tribe29/checkmk/commit/1d4d85f34a43fc6cf0b849d33176298cd…
Author: Benedikt Seidl <benedikt.seidl(a)tribe29.com>
Date: 2021-04-16 (Fri, 16 Apr 2021)
Changed paths:
A .werks/12315
M cmk/base/plugins/agent_based/liebert_temp_air.py
M cmk/base/plugins/agent_based/utils/temperature.py
M tests/unit/cmk/base/plugins/agent_based/test_liebert_temp_air.py
M tests/unit/cmk/base/plugins/agent_based/utils/test_temperature.py
Log Message:
-----------
12315 FIX check: liebert_temp_air: fix Attribute Error
The check liebert_temp_air crashed with "AttributeError ('NoneType' object
has
no attribute 'get')". This should now be fixed.
There were multiple issues:
* value_store was not typed at all, or wrongly typed as string
* the value_store value was not provided (thus the error)
* in `check_temperature` `get_rate` is called (via `_check_trend`)
twice, with the same key and the same value. The second call to
get_rate probably always returned 0. The tests with freezegun raised
an error because get_rate detected no time change.
SUP-5997
Change-Id: Ie268edad24ccaa6fbaf13b82b20900647e52bfa8