From 62299ccf28707c042dd404b3dda301b002b446ca Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Wed, 11 Jan 2017 20:35:43 -0800 Subject: [PATCH] Fixing bug with is_critical --- napalm_fortios/fortios.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/napalm_fortios/fortios.py b/napalm_fortios/fortios.py index 9787095..c7fc01b 100644 --- a/napalm_fortios/fortios.py +++ b/napalm_fortios/fortios.py @@ -468,9 +468,10 @@ def get_temperature(temperature_lines, detail_block): v = int(self._search_line_in_lines('upper_non_recoverable', sensor_block).split('=')[1]) + temp_value = int(temp_value) output[sensor_name] = dict(temperature=float(temp_value), is_alert=is_alert, - is_critical=True if v > temp_value else False) + is_critical=True if temp_value > v else False) return output