summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/cli/bitmask_cli.py
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2016-06-27 18:30:24 +0200
committerRuben Pollan <meskio@sindominio.net>2016-07-03 16:04:41 +0200
commit34411693fb3f43080b98c51575e244c6d403399c (patch)
tree7972344b97b0f99ac5a2cd6ad06acc0201012957 /src/leap/bitmask/cli/bitmask_cli.py
parent803a0219da0445fba0c5eb4d3be8e7a4ab62b06e (diff)
[feat] use SubCommand for the keys dispatcher
- Related: #7965
Diffstat (limited to 'src/leap/bitmask/cli/bitmask_cli.py')
-rwxr-xr-xsrc/leap/bitmask/cli/bitmask_cli.py17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/leap/bitmask/cli/bitmask_cli.py b/src/leap/bitmask/cli/bitmask_cli.py
index fd70c680..9110f88a 100755
--- a/src/leap/bitmask/cli/bitmask_cli.py
+++ b/src/leap/bitmask/cli/bitmask_cli.py
@@ -136,11 +136,9 @@ GENERAL COMMANDS:
parser = argparse.ArgumentParser(
description='Bitmask Keymanager management service',
prog='bitmask_cli keys')
- parser.add_argument('--status', action='store_true',
- help='Display status about service')
- parser.add_argument('--list-keys', action='store_true',
+ parser.add_argument('--list', action='store_true',
help='List all known keys')
- parser.add_argument('--export-key', action='store_true',
+ parser.add_argument('--export', action='store_true',
help='Export the given key')
args = parser.parse_args(sys.argv[2:])
self.subargs = args
@@ -311,14 +309,11 @@ def send_command(cli):
elif cmd == 'keys':
data = ['keys']
- if subargs.status:
- data += ['status']
-
- elif subargs.list_keys:
- data += ['list_keys']
+ if subargs.list:
+ data += ['list']
- elif subargs.export_key:
- data += ['export_keys']
+ elif subargs.export:
+ data += ['export']
else:
error('Use bitmask_cli keys --help to see available subcommands',