Module: check_mk
Branch: master
Commit: 7ab687f904e7f09ad0a39047ec8a1eaa4894382b
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7ab687f904e7f0…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Fri Oct 17 16:07:00 2014 +0200
fixed incorrect call of inventory plugin
Inventory plugins are handled one after another.
If there wasn't any info available for the first plugin 'None' was returned.
If there wasn't any info available for the followup plugins an Exception
was raised and catched.
In some scenarios an inventory plugin got called, even if there was no info available.
---
modules/inventory.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/inventory.py b/modules/inventory.py
index 0739d8f..5c274c1 100644
--- a/modules/inventory.py
+++ b/modules/inventory.py
@@ -229,7 +229,8 @@ def do_inv_for(hostname, ipaddress):
raise # Otherwise simply ignore missing agent section
continue
- if info == None: # section not present
+ if not info: # section not present (None or [])
+ # Note: this also excludes existing sections without info..
continue
if opt_verbose: