From: Alexander Popov Date: Fri, 20 Jul 2018 16:09:08 +0000 (+0300) Subject: Please forgive me, I fear lambdas :\ X-Git-Tag: v0.5.2~88^2~5 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=6a3d6ad780a586e7f93648b77471e1a68bea5dcd;p=kconfig-hardened-check.git Please forgive me, I fear lambdas :\ Also print the value of the unknown option --- 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()