Skip to content

Commit

Permalink
Fixing bug with is_critical
Browse files Browse the repository at this point in the history
  • Loading branch information
ktbyers committed Jan 12, 2017
1 parent f9d7bd0 commit 62299cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion napalm_fortios/fortios.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 62299cc

Please sign in to comment.