Module: check_mk
Branch: master
Commit: e2282622d5664023302dd0c422ee062d29548ef5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e2282622d56640…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Apr 24 16:31:27 2012 +0200
Allow has_perfdata to be missing in check_info
Default is False.
---
modules/check_mk.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 3f03bd2..20e654e 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -423,7 +423,7 @@ def output_check_info():
checks_sorted.sort()
for check_type, check in checks_sorted:
try:
- if check["has_perfdata"]:
+ if check.get("has_perfdata", False):
p = tty_green + tty_bold + "yes" + tty_normal
else:
p = "no"
@@ -1604,7 +1604,7 @@ def create_nagios_servicedefs(outfile, hostname):
else:
used_descriptions[description] = ( checkname, item )
- if check_info[checkname]["has_perfdata"]:
+ if check_info[checkname].get("has_perfdata", False):
template = passive_service_template_perf
else:
template = passive_service_template