aboutsummaryrefslogtreecommitdiffstats
path: root/api/actions
diff options
context:
space:
mode:
Diffstat (limited to 'api/actions')
-rw-r--r--api/actions/env.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/api/actions/env.py b/api/actions/env.py
index 78f9b72ed..fa0f95d90 100644
--- a/api/actions/env.py
+++ b/api/actions/env.py
@@ -53,7 +53,8 @@ def _create_grafana():
def _create_dashboard():
url = 'http://admin:admin@%s:3000/api/dashboards/db' % api_conf.GATEWAY_IP
- data = json.load(file('../dashboard/ping_dashboard.json'))
+ with open('../dashboard/ping_dashboard.json') as dashboard_json:
+ data = json.load(dashboard_json)
HttpClient().post(url, data)