From: Alexander Popov Date: Wed, 8 Jun 2022 17:13:42 +0000 (+0300) Subject: Drop useless checks, the ComplexOptCheck constructor has already checked this X-Git-Tag: v0.6.1~147 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=4def5a25a27318560914dea2c6ca30d72619c802;hp=6734f7a39db4b997feee8a2f8d5ae730ec10594c;p=kconfig-hardened-check.git Drop useless checks, the ComplexOptCheck constructor has already checked this --- diff --git a/kconfig_hardened_check/__init__.py b/kconfig_hardened_check/__init__.py index 01ffcbd..9cb1650 100644 --- a/kconfig_hardened_check/__init__.py +++ b/kconfig_hardened_check/__init__.py @@ -240,8 +240,6 @@ class OR(ComplexOptCheck): # OR(, ) # OR(, ) def check(self): - if not self.opts: - sys.exit('[!] ERROR: invalid OR check') for i, opt in enumerate(self.opts): opt.check() if opt.result.startswith('OK'): @@ -287,7 +285,6 @@ class AND(ComplexOptCheck): if not opt.result.startswith('FAIL: version'): sys.exit('[!] ERROR: unexpected FAIL description "{}"'.format(opt.result)) return - sys.exit('[!] ERROR: invalid AND check') def detect_arch(fname, archs):