Don't return the result from Opt.check(), we don't use it
authorAlexander Popov <alex.popov@linux.com>
Fri, 20 Jul 2018 16:36:52 +0000 (19:36 +0300)
committerAlexander Popov <alex.popov@linux.com>
Fri, 20 Jul 2018 16:46:55 +0000 (19:46 +0300)
kconfig-hardened-check.py

index 26686649bce3b40e847832628b1a1980758ed228..35cf7438591ba1969cffe55132984e9eefe47529 100755 (executable)
@@ -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)