Fix grafana_dashboard py2 compatibility

This commit is contained in:
Johann Queuniet 2018-11-27 15:42:15 +01:00 committed by Toshio Kuratomi
parent 015a00e0da
commit 9ae95d52bc

View file

@ -184,7 +184,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 = settings['buildInfo']['version'].split('.')[0]
except Exception as e:
raise GrafanaAPIException(e)
else: