From 8e561d1eb4723b0484fb477aee132ee6d57e47fe Mon Sep 17 00:00:00 2001 From: Igor Simonov Date: Thu, 1 Nov 2018 08:44:09 +0300 Subject: [PATCH] module grafana_dashboard fix for work python3 (#47708) * fix for work python3 change string to str for work in python3 * delete unusin import module --- lib/ansible/modules/monitoring/grafana_dashboard.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/ansible/modules/monitoring/grafana_dashboard.py b/lib/ansible/modules/monitoring/grafana_dashboard.py index a07d33b916b..91d640e8999 100644 --- a/lib/ansible/modules/monitoring/grafana_dashboard.py +++ b/lib/ansible/modules/monitoring/grafana_dashboard.py @@ -136,7 +136,6 @@ uid: ''' import json -import string from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.urls import fetch_url, url_argument_spec @@ -184,7 +183,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 = str.split(settings['buildInfo']['version'], '.')[0] except Exception as e: raise GrafanaAPIException(e) else: