[checkmk-commits] Check_MK Git: check_mk: Fix: info now None if sections missing and extra_sections are defined

Mathias Kettner mk at mathias-kettner.de
Wed Apr 1 10:06:49 CEST 2015


Module: check_mk
Branch: master
Commit: f5f73b5db3397c55a78711f855bf77b0e955358d
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f5f73b5db3397c55a78711f855bf77b0e955358d

Author: Mathias Kettner <mk at mathias-kettner.de>
Date:   Wed Apr  1 10:06:26 2015 +0200

Fix: info now None if sections missing and extra_sections are defined

---

 modules/check_mk_base.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/check_mk_base.py b/modules/check_mk_base.py
index 7ac6737..94d52c1 100644
--- a/modules/check_mk_base.py
+++ b/modules/check_mk_base.py
@@ -289,7 +289,7 @@ def apply_parse_function(info, section_name):
 
 def get_info_for_check(hostname, ipaddress, section_name, max_cachefile_age=None, ignore_check_interval=False):
     info = apply_parse_function(get_host_info(hostname, ipaddress, section_name, max_cachefile_age, ignore_check_interval), section_name)
-    if section_name in check_info and check_info[section_name]["extra_sections"]:
+    if info != None and section_name in check_info and check_info[section_name]["extra_sections"]:
         info = [ info ]
         for es in check_info[section_name]["extra_sections"]:
             try:



More information about the checkmk-commits mailing list