diff options
author | Kali Kaneko (leap communications) <kali@leap.se> | 2017-04-14 21:29:31 +0200 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2017-04-19 20:14:24 +0200 |
commit | 69009f804c351cf63d9ff8ef06817bf5c026c263 (patch) | |
tree | ebcc0938aeaa6c9db8b50edfb6bff653d1ca3477 /src | |
parent | e57ed0cd5ba92220e09fe80ab04cce0b3cccfaeb (diff) |
[bug] handle disabled case
Diffstat (limited to 'src')
-rw-r--r-- | src/leap/bitmask/cli/command.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/leap/bitmask/cli/command.py b/src/leap/bitmask/cli/command.py index 4bee325..da0c40b 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 |