summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/cli/user.py
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2017-08-31 10:53:20 +0200
committerRuben Pollan <meskio@sindominio.net>2017-08-31 12:56:43 +0200
commit0db7a322a103b9886e74d9e017aa4a6298fdbe55 (patch)
treead13ccc656fb73fb23d06e307032188c0e50afe8 /src/leap/bitmask/cli/user.py
parent663c87c221c42e081b5947e298bc9f0541e6913a (diff)
[feat] make the cli default_printer more generic
Now the default_printer can handle other types than dict, like lists or strings.
Diffstat (limited to 'src/leap/bitmask/cli/user.py')
-rw-r--r--src/leap/bitmask/cli/user.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/leap/bitmask/cli/user.py b/src/leap/bitmask/cli/user.py
index 9af31b3b..deedae01 100644
--- a/src/leap/bitmask/cli/user.py
+++ b/src/leap/bitmask/cli/user.py
@@ -78,7 +78,7 @@ SUBCOMMANDS:
passwd = self._getpass_twice()
self.data += ['create', username, passwd,
subargs.invite, 'True']
- return self._send(printer=command.default_dict_printer)
+ return self._send(printer=command.default_printer)
def auth(self, raw_args):
passwd = None
@@ -92,7 +92,7 @@ SUBCOMMANDS:
passwd = getpass.getpass()
self.data += ['authenticate', username, passwd, 'True']
self.cfg.set('bonafide', 'active', username)
- return self._send(printer=command.default_dict_printer)
+ return self._send(printer=command.default_printer)
def logout(self, raw_args):
username = self._username(raw_args)
@@ -101,7 +101,7 @@ SUBCOMMANDS:
active = self.cfg.get('bonafide', 'active', default=None)
if active == username:
self.cfg.set('bonafide', 'active', "")
- return self._send(printer=command.default_dict_printer)
+ return self._send(printer=command.default_printer)
def list(self, raw_args):
self.data += ['list']
@@ -112,7 +112,7 @@ SUBCOMMANDS:
current_passwd = getpass.getpass('Current password: ')
new_passwd = self._getpass_twice('New password: ')
self.data += ['update', username, current_passwd, new_passwd]
- return self._send(printer=command.default_dict_printer)
+ return self._send(printer=command.default_printer)
def active(self, raw_args):
username = self.cfg.get('bonafide', 'active', default='')