summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/cli/command.py
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2017-02-04 17:01:25 +0100
committerKali Kaneko (leap communications) <kali@leap.se>2017-02-23 00:40:37 +0100
commit701fe5ebc70fb49bb32e81e6d6605f27ad09925b (patch)
tree0763df29131f3abe4604fc3626f51ed4360b5ff1 /src/leap/bitmask/cli/command.py
parent409a4c663ec3c0b4a394fcaa6d4b1c6b527f8522 (diff)
[feature] parse status
- simple status parsing - add separate firewall status - set status for abnormal termination
Diffstat (limited to 'src/leap/bitmask/cli/command.py')
-rw-r--r--src/leap/bitmask/cli/command.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/leap/bitmask/cli/command.py b/src/leap/bitmask/cli/command.py
index ff213a3..a4757f8 100644
--- a/src/leap/bitmask/cli/command.py
+++ b/src/leap/bitmask/cli/command.py
@@ -44,7 +44,11 @@ def default_dict_printer(result):
for key, value in result.items():
if value is None:
value = str(value)
- print(Fore.RESET + key.ljust(10) + Fore.GREEN + value + Fore.RESET)
+ if value in ('OFF', 'OFFLINE', 'ABORTED'):
+ color = Fore.RED
+ else:
+ color = Fore.GREEN
+ print(Fore.RESET + key.ljust(10) + color + value + Fore.RESET)
class Command(object):