Module: check_mk
Branch: master
Commit: 424817f429b509129b99787f791b72fb036d78fa
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=424817f429b509…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Aug 13 08:41:01 2015 +0200
esx_vsphere_counters: Fixed "NoneType object has no attribute" exception in
vsphere check and discovery
---
checks/esx_vsphere_counters | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/checks/esx_vsphere_counters b/checks/esx_vsphere_counters
index e9b85a4..60a1ae6 100644
--- a/checks/esx_vsphere_counters
+++ b/checks/esx_vsphere_counters
@@ -134,7 +134,7 @@ def parse_esx_vsphere_counters(info):
# esx datastores are either shown by human readable name (if available) or by the uid
def esx_vsphere_counters_get_item_mapping(parsed):
map_instance_to_item = {}
- for instance in parsed.get("datastore.read").keys():
+ for instance in parsed.get("datastore.read", {}).keys():
map_instance_to_item[instance] = instance
for instance, values in parsed.get("datastore.name").items():