From 62a27eb9596ed597b85b6c215be77ca5db4807d9 Mon Sep 17 00:00:00 2001 From: "Kali Kaneko (leap communications)" Date: Thu, 22 Dec 2016 14:30:30 +0100 Subject: [feat] allow --pass on auth too, for tests undocumented because we don't want users messing with the option --- src/leap/bitmask/cli/user.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/leap/bitmask/cli/user.py b/src/leap/bitmask/cli/user.py index d13d417..b802d86 100644 --- a/src/leap/bitmask/cli/user.py +++ b/src/leap/bitmask/cli/user.py @@ -83,8 +83,15 @@ SUBCOMMANDS: return self._send(printer=command.default_dict_printer) def auth(self, raw_args): + passwd = None + for (index, item) in enumerate(raw_args): + if item.startswith('--pass'): + passwd = raw_args.pop(index + 1) + raw_args.pop(index) + username = self.username(raw_args) - passwd = getpass.getpass() + if not passwd: + passwd = getpass.getpass() self.data += ['authenticate', username, passwd, 'true'] return self._send(printer=command.default_dict_printer) -- cgit v1.2.3