openldap: fix dict access with python3 (#8162)
Fixes the following error: Feb 22 19:38:23 eve netdata[11810]: 2020-02-22 19:38:23: python.d WARNING: plugin[main] : openldap[localhost] : unhandled exception on check : TypeError("'dict_values' object is not subscriptable"), skipping the job
Jörg Thalheim committed
Feb 24, 2020 at 07:31 UTC
8762d2e4ed4dfc73b3fffa4b1a82ad6a8ed551b4
1 file changed
+1
-1
collectors/python.d.plugin/openldap/openldap.chart.py
+1
-1
@@ -199,7 +199,7 @@ class Service(SimpleService):
199
200
try:
201
if result_type == 101:
202
- val = int(result_data[0][1].values()[0][0])
202
+ val = int(list(result_data[0][1].values())[0][0])
203
except (ValueError, IndexError) as error:
204
self.debug(error)
205
continue