From 663c87c221c42e081b5947e298bc9f0541e6913a Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Wed, 30 Aug 2017 19:54:37 +0200 Subject: [feat] list vpn gateways in the order that they are going to be used --- src/leap/bitmask/cli/vpn.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/leap/bitmask/cli') diff --git a/src/leap/bitmask/cli/vpn.py b/src/leap/bitmask/cli/vpn.py index 5a9cce9e..bcc2a448 100644 --- a/src/leap/bitmask/cli/vpn.py +++ b/src/leap/bitmask/cli/vpn.py @@ -125,10 +125,10 @@ def location_printer(result): value + Fore.RESET) for provider, locations in result.items(): - for loc in locations.values(): - location_str = ("[%(country_code)s] %(name)s " - "(UTC%(timezone)s %(hemisphere)s)" % loc) - pprint(provider, location_str) - - if not locations.values(): - pprint(provider, "---") + for loc in locations: + if 'name' not in loc: + pprint(provider, "---") + else: + location_str = ("[%(country_code)s] %(name)s " + "(UTC%(timezone)s %(hemisphere)s)" % loc) + pprint(provider, location_str) -- cgit v1.2.3