From 00f4feb04c22618a00fb4099907e2ee08fc42710 Mon Sep 17 00:00:00 2001 From: Alice Date: Mon, 8 Apr 2019 20:45:20 +0200 Subject: [PATCH] Fix API paths --- lambdainst/core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lambdainst/core.py b/lambdainst/core.py index 95d27c1..ae07a35 100644 --- a/lambdainst/core.py +++ b/lambdainst/core.py @@ -79,7 +79,7 @@ def current_active_sessions(): @APICache(initial=lambda: []) def get_locations(): - gateways = core_api.get('/gateways/', enabled=True) + gateways = core_api.get('gateways/', enabled=True) locations = {} for gw in gateways.list_iter(): @@ -95,7 +95,7 @@ def get_locations(): ) locations[cc]['servers'] += 1 - locations[cc]['bandwidth'] += gw['bandwidth'] + locations[cc]['bandwidth'] += gw['bandwidth'] or 0 locations = sorted(locations.items(), key=lambda x: x[1]['country_code']) return locations @@ -103,7 +103,7 @@ def get_locations(): @APICache(initial=lambda: []) def get_gateway_exit_ips(): - gateways = core_api.get('/gateways/', enabled=True) + gateways = core_api.get('gateways/', enabled=True) ipv4_list = [] ipv6_list = []