summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
authordrebs <drebs@riseup.net>2016-11-06 13:35:46 -0200
committerdrebs <drebs@riseup.net>2016-11-06 14:21:16 -0200
commit596f1f82b1d6b28f4a92d3669fefdd8ec9a734fc (patch)
tree26b8030b9bbcb04e7b31e053a53978455a8d909e /src/leap
parent501005d7d54bd57a37df4777154f0e47e4dc622c (diff)
[feat] allow verbose flag when autostarting
Diffstat (limited to 'src/leap')
-rwxr-xr-xsrc/leap/bitmask/cli/bitmask_cli.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/leap/bitmask/cli/bitmask_cli.py b/src/leap/bitmask/cli/bitmask_cli.py
index 4f275d9c..60bf7d9d 100755
--- a/src/leap/bitmask/cli/bitmask_cli.py
+++ b/src/leap/bitmask/cli/bitmask_cli.py
@@ -121,14 +121,19 @@ GENERAL COMMANDS:
value + Fore.RESET)
-@defer.inlineCallbacks
-def execute():
- cli = BitmaskCLI()
+def _check_started(cli):
cli.data = ['version']
+ args = ['--verbose'] if '--verbose' in sys.argv else None
yield cli._send(
timeout=0.1, printer=_null_printer,
- errb=lambda: cli.start(None))
+ errb=lambda: cli.start(args))
cli.data = []
+
+
+@defer.inlineCallbacks
+def execute():
+ cli = BitmaskCLI()
+ _check_started(cli)
yield cli.execute(sys.argv[1:])
try:
yield reactor.stop()