summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2017-04-14 21:29:31 +0200
committerKali Kaneko (leap communications) <kali@leap.se>2017-04-19 20:14:24 +0200
commit69009f804c351cf63d9ff8ef06817bf5c026c263 (patch)
treeebcc0938aeaa6c9db8b50edfb6bff653d1ca3477 /src
parente57ed0cd5ba92220e09fe80ab04cce0b3cccfaeb (diff)
[bug] handle disabled case
Diffstat (limited to 'src')
-rw-r--r--src/leap/bitmask/cli/command.py7
1 files changed, 6 insertions, 1 deletions
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