Commit a11d573c by Alexander Popov

Revisit return values

parent c3dc7cf5
...@@ -611,9 +611,7 @@ def main(): ...@@ -611,9 +611,7 @@ def main():
check_config_file(config_checklist, args.config, arch) check_config_file(config_checklist, args.config, arch)
error_count = len(list(filter(lambda opt: opt.result.startswith('FAIL'), config_checklist))) 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))) ok_count = len(list(filter(lambda opt: opt.result.startswith('OK'), config_checklist)))
if debug_mode: if not debug_mode and not json_mode:
sys.exit(0)
if not json_mode:
print('[+] config check is finished: \'OK\' - {} / \'FAIL\' - {}'.format(ok_count, error_count)) print('[+] config check is finished: \'OK\' - {} / \'FAIL\' - {}'.format(ok_count, error_count))
sys.exit(0) sys.exit(0)
...@@ -626,6 +624,7 @@ def main(): ...@@ -626,6 +624,7 @@ def main():
sys.exit(0) sys.exit(0)
parser.print_help() parser.print_help()
sys.exit(0)
if __name__ == '__main__': if __name__ == '__main__':
main() main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment