module grafana_dashboard fix for work python3 (#47708)

* fix for work python3

change string to str for work in python3

* delete unusin import module
This commit is contained in:
Igor Simonov 2018-11-01 08:44:09 +03:00 committed by Jordan Borean
parent ab0d90f882
commit 8e561d1eb4

View file

@ -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: