mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-02 00:33:09 +00:00
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:
committed by
Jordan Borean
parent
ab0d90f882
commit
8e561d1eb4
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user