get_option_state function now looks a lot prettier using dict.get() method
authorAnatoly Ivanov <bmth@me.com>
Mon, 30 Jul 2018 14:17:05 +0000 (17:17 +0300)
committerAlexander Popov <alex.popov@linux.com>
Mon, 30 Jul 2018 19:59:40 +0000 (22:59 +0300)
kconfig-hardened-check.py

index e5867225650ecbebe95cd218084e93181f09c128..ac9ee3ac2ebf27e86b48453303222ae16f90cd49 100755 (executable)
@@ -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):