From: Alexander Popov Date: Wed, 12 Jul 2023 08:11:27 +0000 (+0300) Subject: Show error if some cmdline option exists multiple times X-Git-Tag: v0.6.6~125 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=320ab961d8804f2d495796049485827f882edf7b;hp=dc68441b86d36554134c202e955de48ba21f9193;p=kconfig-hardened-check.git Show error if some cmdline option exists multiple times --- diff --git a/kconfig_hardened_check/__init__.py b/kconfig_hardened_check/__init__.py index a423358..572ed0a 100644 --- a/kconfig_hardened_check/__init__.py +++ b/kconfig_hardened_check/__init__.py @@ -193,6 +193,8 @@ def parse_cmdline_file(parsed_options, fname): else: name = opt value = '' # '' is not None + if name in parsed_options: + sys.exit(f'[!] ERROR: cmdline option "{name}" exists multiple times') value = normalize_cmdline_options(name, value) parsed_options[name] = value