From 69009f804c351cf63d9ff8ef06817bf5c026c263 Mon Sep 17 00:00:00 2001 From: "Kali Kaneko (leap communications)" Date: Fri, 14 Apr 2017 21:29:31 +0200 Subject: [bug] handle disabled case --- src/leap/bitmask/cli/command.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/leap/bitmask/cli') diff --git a/src/leap/bitmask/cli/command.py b/src/leap/bitmask/cli/command.py index 4bee325d..da0c40b0 100644 --- a/src/leap/bitmask/cli/command.py +++ b/src/leap/bitmask/cli/command.py @@ -52,7 +52,12 @@ def default_dict_printer(result): def print_status(status, depth=0): - for name, v in [(' status', status)] + status['childrenStatus'].items(): + + if status.get('vpn') == 'disabled': + print('vpn ' + Fore.RED + 'disabled' + Fore.RESET) + return + + for name, v in [('status', status)] + status['childrenStatus'].items(): line = Fore.RESET + name.ljust(12) if v['status'] in ('on', 'starting'): line += Fore.GREEN -- cgit v1.2.3