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: