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:
parent
ab0d90f882
commit
8e561d1eb4
1 changed files with 1 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue