From da2ad76655e19340e0482cae09965dcf96f70758 Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Fri, 20 Jul 2018 19:36:52 +0300 Subject: [PATCH] Don't return the result from Opt.check(), we don't use it --- kconfig-hardened-check.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/kconfig-hardened-check.py b/kconfig-hardened-check.py index 2668664..35cf743 100755 --- a/kconfig-hardened-check.py +++ b/kconfig-hardened-check.py @@ -40,21 +40,15 @@ class Opt: if self.expected == self.state: self.result = 'OK' - return True, self.result - - - if self.state is None: + elif self.state is None: if self.expected == 'is not set': self.result = 'OK: not found' - return True, self.result else: error_count += 1 self.result = 'FAIL: not found' - return False, self.result - - error_count += 1 - self.result = 'FAIL: "' + self.state + '"' - return False, self.result + else: + error_count += 1 + self.result = 'FAIL: "' + self.state + '"' def __repr__(self): return '{} = {}'.format(self.name, self.state) -- 2.31.1