From 9ae95d52bcd1c8239f2440a36e5bc7a66fa747c3 Mon Sep 17 00:00:00 2001 From: Johann Queuniet Date: Tue, 27 Nov 2018 15:42:15 +0100 Subject: [PATCH] Fix grafana_dashboard py2 compatibility --- lib/ansible/modules/monitoring/grafana_dashboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/monitoring/grafana_dashboard.py b/lib/ansible/modules/monitoring/grafana_dashboard.py index 4b4ae9bacc7..67f99e8433a 100644 --- a/lib/ansible/modules/monitoring/grafana_dashboard.py +++ b/lib/ansible/modules/monitoring/grafana_dashboard.py @@ -184,7 +184,7 @@ def get_grafana_version(module, grafana_url, headers): if info['status'] == 200: try: settings = json.loads(r.read()) - grafana_version = string.split(settings['buildInfo']['version'], '.')[0] + grafana_version = settings['buildInfo']['version'].split('.')[0] except Exception as e: raise GrafanaAPIException(e) else: