From a1877f36032c5c4fd0685cda7c8843ce02a4d044 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 13 Feb 2018 22:44:19 +0100 Subject: [bug] bitmaskctl status should not start bitmaskd -Resolves: #9244 --- src/leap/bitmask/cli/bitmask_cli.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/leap/bitmask/cli/bitmask_cli.py b/src/leap/bitmask/cli/bitmask_cli.py index b048bb69..57435b8d 100755 --- a/src/leap/bitmask/cli/bitmask_cli.py +++ b/src/leap/bitmask/cli/bitmask_cli.py @@ -146,10 +146,18 @@ def execute(): cli.data = ['core', 'version'] args = None if '--noverbose' in sys.argv else ['--verbose'] + def status_timeout(args): + raise RuntimeError('bitmaskd is not running') + + if 'status' in sys.arv: + timeout_fun = status_timeout + else: + timeout_fun = cli.start + try: yield cli._send( timeout=0.1, printer=_null_printer, - errb=lambda: cli.start(args)) + errb=lambda: timeout_fun(args)) except Exception, e: print(Fore.RED + "ERROR: " + Fore.RESET + "%s" % str(e)) -- cgit v1.2.3