From: Anatoly Ivanov Date: Mon, 30 Jul 2018 14:17:05 +0000 (+0300) Subject: get_option_state function now looks a lot prettier using dict.get() method X-Git-Tag: v0.5.2~74^2 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=a54cd3b89b7208815e39076066cd6e2a1ee33956;p=kconfig-hardened-check.git get_option_state function now looks a lot prettier using dict.get() method --- diff --git a/kconfig-hardened-check.py b/kconfig-hardened-check.py index e586722..ac9ee3a 100755 --- a/kconfig-hardened-check.py +++ b/kconfig-hardened-check.py @@ -234,7 +234,7 @@ def print_check_results(): def get_option_state(options, name): - return options[name] if name in options else None + return options.get(name, None) def perform_checks(parsed_options):