Fix grafana_dashboard py2 compatibility

pull/50738/head
Johann Queuniet 6 years ago committed by Toshio Kuratomi
parent 015a00e0da
commit 9ae95d52bc

@ -184,7 +184,7 @@ def get_grafana_version(module, grafana_url, headers):
if info['status'] == 200: if info['status'] == 200:
try: try:
settings = json.loads(r.read()) settings = json.loads(r.read())
grafana_version = string.split(settings['buildInfo']['version'], '.')[0] grafana_version = settings['buildInfo']['version'].split('.')[0]
except Exception as e: except Exception as e:
raise GrafanaAPIException(e) raise GrafanaAPIException(e)
else: else:

Loading…
Cancel
Save