From 701fe5ebc70fb49bb32e81e6d6605f27ad09925b Mon Sep 17 00:00:00 2001 From: "Kali Kaneko (leap communications)" Date: Sat, 4 Feb 2017 17:01:25 +0100 Subject: [feature] parse status - simple status parsing - add separate firewall status - set status for abnormal termination --- src/leap/bitmask/cli/command.py | 6 +++++- 1 file changed, 5 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 ff213a35..a4757f80 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): -- cgit v1.2.3