From 1d4a3d68869dd9c416b104399097a6bb0c1bace3 Mon Sep 17 00:00:00 2001 From: "Kali Kaneko (leap communications)" Date: Wed, 1 Feb 2017 14:49:45 +0100 Subject: [feature] new commands: get_cert --- src/leap/bitmask/cli/command.py | 6 +++++- src/leap/bitmask/cli/eip.py | 14 +++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) (limited to 'src/leap/bitmask/cli') diff --git a/src/leap/bitmask/cli/command.py b/src/leap/bitmask/cli/command.py index 0e70d2e7..ff213a35 100644 --- a/src/leap/bitmask/cli/command.py +++ b/src/leap/bitmask/cli/command.py @@ -116,7 +116,11 @@ class Command(object): if self.print_json: print(json.dumps(obj, indent=2)) elif not obj['error']: - return printer(obj['result']) + if not obj['result']: + print (Fore.RED + 'ERROR: malformed response, expected' + ' obj["result"]' + Fore.RESET) + else: + return printer(obj['result']) else: print Fore.RED + 'ERROR:' + '%s' % obj['error'] + Fore.RESET diff --git a/src/leap/bitmask/cli/eip.py b/src/leap/bitmask/cli/eip.py index eac8682a..5fb240cd 100644 --- a/src/leap/bitmask/cli/eip.py +++ b/src/leap/bitmask/cli/eip.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # eip -# Copyright (C) 2016 LEAP +# Copyright (C) 2016-2017 LEAP # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,14 +24,18 @@ class Eip(command.Command): service = 'eip' usage = '''{name} eip -Bitmask Encrypted Internet Service +Bitmask Encrypted Internet Proxy Service SUBCOMMANDS: - start Start service - stop Stop service + enable Enable EIP Service + disable Disable EIP Service + check Check whether EIP service is properly configured + get_cert Get EIP Certificate from provider + start Start EIP + stop Stop EIP status Display status about service '''.format(name=command.appname) - commands = ['start', 'stop', 'status'] + commands = ['start', 'stop', 'status', 'check', 'get_cert'] -- cgit v1.2.3