From: Alexander Popov Date: Tue, 12 Mar 2019 13:42:23 +0000 (+0300) Subject: Add a sanity check and do minor refactoring X-Git-Tag: v0.5.2~40 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=5b88ee0830a5e602bf680e2efe7d8edf658629f4;p=kconfig-hardened-check.git Add a sanity check and do minor refactoring --- diff --git a/kconfig-hardened-check.py b/kconfig-hardened-check.py index 6714f05..879ff7b 100755 --- a/kconfig-hardened-check.py +++ b/kconfig-hardened-check.py @@ -101,9 +101,12 @@ class OR(ComplexOptCheck): # OR(, ) def check(self): + if not self.opts: + sys.exit('[!] ERROR: invalid OR check') + for i, opt in enumerate(self.opts): - result, msg = opt.check() - if result: + ret, msg = opt.check() + if ret: if i == 0: self.result = opt.result else: