From: Alexander Popov Date: Thu, 28 Apr 2022 11:38:31 +0000 (+0300) Subject: Merge pull request #62 from evdenis/master X-Git-Tag: v0.5.17~1 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=80d998f6a81715f020ea3032848d1f834ed2c730;hp=bbe60e75ac73b5513f86943775ac02285e0aecd0;p=kconfig-hardened-check.git Merge pull request #62 from evdenis/master Add BLK_DEV_FD_RAWCMD Thanks @evdenis! --- diff --git a/kconfig_hardened_check/__init__.py b/kconfig_hardened_check/__init__.py index ae373d2..d3cbad1 100644 --- a/kconfig_hardened_check/__init__.py +++ b/kconfig_hardened_check/__init__.py @@ -97,6 +97,10 @@ class OptCheck: self.state = None self.result = None + @property + def type(self): + return None + def check(self): # handle the option presence check if self.expected is None: @@ -716,6 +720,8 @@ def print_checklist(mode, checklist, with_results): def populate_simple_opt_with_data(opt, data, data_type): if opt.type == 'complex': sys.exit('[!] ERROR: unexpected ComplexOptCheck {}: {}'.format(opt.name, vars(opt))) + if opt.type not in TYPES_OF_CHECKS: + sys.exit('[!] ERROR: invalid opt type "{}" for {}'.format(opt.type, opt.name)) if data_type not in TYPES_OF_CHECKS: sys.exit('[!] ERROR: invalid data type "{}"'.format(data_type))