Skip to content

Commit

Permalink
Cast properly new ignore_nonincreasing_oid option to bool
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoCavaille committed Jan 14, 2015
1 parent 4cc84b1 commit 2ff9966
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion checks.d/snmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

# project
from checks import AgentCheck
from config import _is_affirmative

# 3rd party
from pysnmp.entity.rfc3413.oneliner import cmdgen
Expand Down Expand Up @@ -44,7 +45,7 @@ def __init__(self, name, init_config, agentConfig, instances=None):
ignore_nonincreasing_oid = False
if init_config is not None:
mibs_path = init_config.get("mibs_folder")
ignore_nonincreasing_oid = init_config.get("ignore_nonincreasing_oid", False)
ignore_nonincreasing_oid = _is_affirmative(init_config.get("ignore_nonincreasing_oid", False))
SnmpCheck.create_command_generator(mibs_path, ignore_nonincreasing_oid)

@classmethod
Expand Down

0 comments on commit 2ff9966

Please sign in to comment.