summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/leap/bitmask/cli/user.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/leap/bitmask/cli/user.py b/src/leap/bitmask/cli/user.py
index d45d5037..d13d4177 100644
--- a/src/leap/bitmask/cli/user.py
+++ b/src/leap/bitmask/cli/user.py
@@ -52,6 +52,13 @@ SUBCOMMANDS:
def create(self, raw_args):
args = tuple([command.appname] + sys.argv[1:4])
+ passwd = None
+
+ for (index, item) in enumerate(raw_args):
+ if item.startswith('--pass'):
+ passwd = raw_args.pop(index + 1)
+ raw_args.pop(index)
+
parser = argparse.ArgumentParser(
description='Bitmask user',
prog='%s %s %s %s' % args)
@@ -69,7 +76,8 @@ SUBCOMMANDS:
args.pop(index)
username = self.username(args)
- passwd = self._getpass_twice()
+ if not passwd:
+ passwd = self._getpass_twice()
self.data += ['create', username, passwd,
subargs.invite, 'true']
return self._send(printer=command.default_dict_printer)
@@ -129,6 +137,7 @@ SUBCOMMANDS:
color = Fore.GREEN
print(color + u['userid'] + Fore.RESET)
+
_username_kw = {
'nargs': '?',
'help': 'username ID, in the form <user@example.org>'}