summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/cli/bitmask_cli.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/bitmask_cli.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/bitmask_cli.py')
-rwxr-xr-xsrc/leap/bitmask/cli/bitmask_cli.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/leap/bitmask/cli/bitmask_cli.py b/src/leap/bitmask/cli/bitmask_cli.py
index 2483d476..eafdb1e4 100755
--- a/src/leap/bitmask/cli/bitmask_cli.py
+++ b/src/leap/bitmask/cli/bitmask_cli.py
@@ -131,11 +131,11 @@ OPTIONAL ARGUMENTS:
def stop(self, raw_args):
self.data = ['core', 'stop']
self.cfg.set('bonafide', 'active', "")
- return self._send(printer=command.default_dict_printer)
+ return self._send(printer=command.default_printer)
def stats(self, raw_args):
self.data = ['core', 'stats']
- return self._send(printer=command.default_dict_printer)
+ return self._send(printer=command.default_printer)
@defer.inlineCallbacks
@@ -166,7 +166,7 @@ def execute():
yield cli.execute(args)
cmdline = ' '.join(sys.argv)
if 'ctl start' in cmdline or 'ctl restart' in cmdline:
- command.default_dict_printer({'start': 'ok'})
+ command.default_printer({'start': 'ok'})
except Exception as e:
print(Fore.RED + "ERROR: " + Fore.RESET +
"%s" % str(e))