Fix pylint warning
authorAlexander Popov <alex.popov@linux.com>
Sat, 23 Nov 2024 22:13:15 +0000 (01:13 +0300)
committerAlexander Popov <alex.popov@linux.com>
Sat, 23 Nov 2024 22:13:15 +0000 (01:13 +0300)
kernel_hardening_checker/engine.py

index f0ffdf28f46e6a751ead6b0dac01edb28bed4e5d..038e45cb1bc0d5b0698c405d0317f9c6e87dbd0d 100755 (executable)
@@ -93,7 +93,7 @@ class OptCheck:
         if self.expected == 'is not off':
             if self.state == 'off':
                 self.result = 'FAIL: is off'
-            elif self.state == '0' or self.state == 'is not set':
+            elif self.state in ('0', 'is not set'):
                 self.result = f'FAIL: is off, "{self.state}"'
             elif self.state is None:
                 self.result = 'FAIL: is off, not found'