From 6a3d6ad780a586e7f93648b77471e1a68bea5dcd Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Fri, 20 Jul 2018 19:09:08 +0300 Subject: [PATCH] Please forgive me, I fear lambdas :\ Also print the value of the unknown option --- kconfig-hardened-check.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kconfig-hardened-check.py b/kconfig-hardened-check.py index 07c71d6..6bb930b 100755 --- a/kconfig-hardened-check.py +++ b/kconfig-hardened-check.py @@ -217,9 +217,10 @@ def check_config_file(fname): perform_checks(parsed_options) if debug_mode: - opt_list_names = [opt[0].name for opt in opt_list] - for option in filter(lambda option: option not in opt_list_names, parsed_options.keys()): - print("DEBUG: dunno about option {} ".format(option)) + known_options = [o[0].name for o in opt_list] + for option, value in parsed_options.items(): + if option not in known_options: + print("DEBUG: dunno about option {} ({})".format(option, value)) print_check_results() -- 2.31.1