X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=kconfig_hardened_check%2F__init__.py;h=d1c77d0cc64339ed277e32adcd39f4742948571b;hb=98fb9d9758e6286d8ba82e834958806b8ea78211;hp=fea82724f2aa54ae19bb0bd799ed28ff34ec58b9;hpb=55164d26f50133027deb9928c8fa607c7427fd65;p=kconfig-hardened-check.git diff --git a/kconfig_hardened_check/__init__.py b/kconfig_hardened_check/__init__.py index fea8272..d1c77d0 100644 --- a/kconfig_hardened_check/__init__.py +++ b/kconfig_hardened_check/__init__.py @@ -189,29 +189,21 @@ class ComplexOptCheck: 'empty {} check'.format(self.__class__.__name__) assert(len(self.opts) != 1), \ 'useless {} check: {}'.format(self.__class__.__name__, opts) - assert(isinstance(opts[0], KconfigCheck) or isinstance(opts[0], CmdlineCheck)), \ + assert(isinstance(opts[0], (KconfigCheck, CmdlineCheck))), \ 'invalid {} check: {}'.format(self.__class__.__name__, opts) self.result = None - @property - def name(self): - return self.opts[0].name - @property def type(self): return 'complex' @property - def expected(self): - return self.opts[0].expected - - @property - def decision(self): - return self.opts[0].decision + def name(self): + return self.opts[0].name @property - def reason(self): - return self.opts[0].reason + def expected(self): + return self.opts[0].expected def table_print(self, mode, with_results): if mode == 'verbose': @@ -912,6 +904,3 @@ def main(): parser.print_help() sys.exit(0) - -if __name__ == '__main__': - main()