From 00a9de84771b27e62515ce6d878d182c8f053de5 Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Tue, 18 Jul 2017 19:15:38 +0200 Subject: [feat] remove active user from get_token We need to update the UI to use the new API. - Resolves: #8974 --- src/leap/bitmask/cli/mail.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/leap/bitmask/cli') diff --git a/src/leap/bitmask/cli/mail.py b/src/leap/bitmask/cli/mail.py index 21b93c24..b6d6cd16 100644 --- a/src/leap/bitmask/cli/mail.py +++ b/src/leap/bitmask/cli/mail.py @@ -38,7 +38,7 @@ SUBCOMMANDS: '''.format(name=command.appname) - commands = ['enable', 'disable', 'get_token'] + commands = ['enable', 'disable'] def status(self, raw_args): parser = argparse.ArgumentParser( @@ -57,6 +57,23 @@ SUBCOMMANDS: return self._send(command.print_status) + def get_token(self, raw_args): + parser = argparse.ArgumentParser( + description='Bitmask email status', + prog='%s %s %s' % tuple(sys.argv[:3])) + parser.add_argument('uid', nargs='?', default=None, + help='uid to check the status of') + subargs = parser.parse_args(raw_args) + + uid = None + if subargs.uid: + uid = subargs.uid + else: + uid = self.cfg.get('bonafide', 'active', default=None) + self.data += ['get_token', uid] + + return self._send(command.default_dict_printer) + def mixnet_status(self, raw_args): parser = argparse.ArgumentParser( description='Bitmask mixnet status', -- cgit v1.2.3