diff options
author | Ruben Pollan <meskio@sindominio.net> | 2017-08-30 19:54:37 +0200 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2017-08-31 12:56:43 +0200 |
commit | 663c87c221c42e081b5947e298bc9f0541e6913a (patch) | |
tree | d933acad5df919614e600aa1ae2e737ebcc6e472 /src/leap/bitmask/cli/vpn.py | |
parent | f19bfeb73fc19747bd02cbbd5c024de4dc86b5a8 (diff) |
[feat] list vpn gateways in the order that they are going to be used
Diffstat (limited to 'src/leap/bitmask/cli/vpn.py')
-rw-r--r-- | src/leap/bitmask/cli/vpn.py | 14 |
1 files changed, 7 insertions, 7 deletions
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) |