From a11d573cf5ddefd51d9ce7f2da1de0fc1944016a Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Mon, 30 Mar 2020 14:53:55 +0300 Subject: [PATCH] Revisit return values --- kconfig_hardened_check/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kconfig_hardened_check/__init__.py b/kconfig_hardened_check/__init__.py index 3fcb5e0..8e224c9 100755 --- a/kconfig_hardened_check/__init__.py +++ b/kconfig_hardened_check/__init__.py @@ -611,9 +611,7 @@ def main(): check_config_file(config_checklist, args.config, arch) error_count = len(list(filter(lambda opt: opt.result.startswith('FAIL'), config_checklist))) ok_count = len(list(filter(lambda opt: opt.result.startswith('OK'), config_checklist))) - if debug_mode: - sys.exit(0) - if not json_mode: + if not debug_mode and not json_mode: print('[+] config check is finished: \'OK\' - {} / \'FAIL\' - {}'.format(ok_count, error_count)) sys.exit(0) @@ -626,6 +624,7 @@ def main(): sys.exit(0) parser.print_help() + sys.exit(0) if __name__ == '__main__': main() -- 2.31.1