Module: check_mk
Branch: master
Commit: acd9d79de5c252225dc361004853098e1456b5dc
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=acd9d79de5c252…
Author: Goetz Golla <gg(a)mathias-kettner.de>
Date: Fri Jul 11 14:30:56 2014 +0200
minor fix in inventory function for cases when no data was found
---
checks/netapp_cluster | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/checks/netapp_cluster b/checks/netapp_cluster
index 58fe351..66f5a52 100644
--- a/checks/netapp_cluster
+++ b/checks/netapp_cluster
@@ -46,15 +46,14 @@
def inventory_netapp_cluster(info):
-
inventory = []
-
- # only inventorizes clusters that dont have takeover disabled.
- cfSettings, cfState, cfCannotTakeoverCause, cfPartnerStatus, cfPartnerName,
cfInterconnectStatus = info[0]
- if int(cfSettings) not in [1, 3]:
- # Include the cluster partner name in inventory (value added data)
- inventory.append ((cfPartnerName, None))
- return inventory
+ if info:
+ cfSettings, cfState, cfCannotTakeoverCause, cfPartnerStatus, cfPartnerName,
cfInterconnectStatus = info[0]
+ # only inventorizes clusters that dont have takeover disabled.
+ if int(cfSettings) not in [1, 3]:
+ # Include the cluster partner name in inventory (value added data)
+ inventory.append ((cfPartnerName, None))
+ return inventory
def check_netapp_cluster(item, _no_params, info):