Commit 43920b20 by Alexander Popov

Improve the final result output

Refers to issue #13.
parent c83dc6c7
...@@ -423,13 +423,11 @@ if __name__ == '__main__': ...@@ -423,13 +423,11 @@ if __name__ == '__main__':
construct_checklist(arch) construct_checklist(arch)
check_config_file(args.config) check_config_file(args.config)
error_count = len(list(filter(lambda opt: opt.result and opt.result.startswith('FAIL'), checklist))) error_count = len(list(filter(lambda opt: opt.result and opt.result.startswith('FAIL'), checklist)))
ok_count = len(list(filter(lambda opt: opt.result and opt.result.startswith('OK'), checklist)))
if debug_mode: if debug_mode:
sys.exit(0) sys.exit(0)
if error_count == 0: print('[+] config check is finished: \'OK\' - {} / \'FAIL\' - {}'.format(ok_count, error_count))
print('[+] config check is PASSED') sys.exit(0)
sys.exit(0)
else:
sys.exit('[-] config check is NOT PASSED: {} errors'.format(error_count))
if args.print: if args.print:
arch = args.print arch = args.print
......
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