From 596f1f82b1d6b28f4a92d3669fefdd8ec9a734fc Mon Sep 17 00:00:00 2001 From: drebs Date: Sun, 6 Nov 2016 13:35:46 -0200 Subject: [feat] allow verbose flag when autostarting --- src/leap/bitmask/cli/bitmask_cli.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/leap/bitmask') diff --git a/src/leap/bitmask/cli/bitmask_cli.py b/src/leap/bitmask/cli/bitmask_cli.py index 4f275d9..60bf7d9 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() -- cgit v1.2.3