We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
selinux module install check refers to binary not in user path
The selinux module tries to check whether selinux is installed.

`if not self.py3.check_commands(['getenforce']):`

this effectively runs `which getenforce`. The getenforce binary is installed under /usr/sbin (gentoo, also fedora as far as i read) which is not in the regular user path and therefore not found, resulting in the message `selinux: isn't installed`.
Removing the check makes the module work as expected.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `py3status/modules/selinux.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 """
3 Display SELinux state.
4 
5 This module displays the state of SELinux on your machine:
6 Enforcing (good), Permissive (bad), or Disabled (bad).
7 
8 Configuration parameters:
9     cache_timeout: refresh interval for this module (default 10)
10     format: display format for this module (default 'selinux: {state}')
11     state_disabled: show when no SELinux policy is loaded.
12         (default 'disabled')
13     state_enforcing: show when SELinux security policy is enforced.
14         (default 'enforcing')
15     state_permissive: show when SELinux prints warnings instead of enforcing.
16         (default 'permissive')
17 
18 Format placeholders:
19     {state} SELinux state
20 
21 Color options:
22     color_bad: Enforcing
23     color_degraded: Permissive
24     color_good: Disabled
25 
26 Requires:
27     libselinux-python: SELinux python bindings for libselinux
28 
29 @author bstinsonmhk
30 @license BSD
31 
32 SAMPLE OUTPUT
33 {'full_text': 'selinux: enforcing', 'color': '#00FF00'}
34 
35 permissive
36 {'full_text': 'selinux: permissive', 'color': '#FFFF00'}
37 
38 disabled
39 {'full_text': 'selinux: disabled', 'color': '#FF0000'}
40 """
41 from __future__ import absolute_import
42 import selinux
43 STRING_UNAVAILABLE = "selinux: isn't installed"
44 
45 
46 class Py3status:
47     """
48     """
49     # available configuration parameters
50     cache_timeout = 10
51     format = 'selinux: {state}'
52     state_disabled = 'disabled'
53     state_enforcing = 'enforcing'
54     state_permissive = 'permissive'
55 
56     def selinux(self):
57         if not self.py3.check_commands(['getenforce']):
58             return {'cache_until': self.py3.CACHE_FOREVER,
59                     'color': self.py3.COLOR_BAD,
60                     'full_text': STRING_UNAVAILABLE}
61         try:
62             if selinux.security_getenforce():
63                 state = self.state_enforcing
64                 color = self.py3.COLOR_GOOD
65             else:
66                 state = self.state_permissive
67                 color = self.py3.COLOR_BAD
68         except:
69             state = self.state_disabled
70             color = self.py3.COLOR_BAD
71 
72         return {'cached_until': self.py3.time_in(self.cache_timeout),
73                 'full_text': self.py3.safe_format(self.format, {'state': state}),
74                 'color': color}
75 
76 
77 if __name__ == '__main__':
78     """
79     Run module in test mode.
80     """
81     from py3status.module_test import module_test
82     module_test(Py3status)
83
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/py3status/modules/selinux.py b/py3status/modules/selinux.py
--- a/py3status/modules/selinux.py
+++ b/py3status/modules/selinux.py
@@ -3,11 +3,11 @@
 Display SELinux state.
 
 This module displays the state of SELinux on your machine:
-Enforcing (good), Permissive (bad), or Disabled (bad).
+Enforcing (good), Permissive (degraded), or Disabled (bad).
 
 Configuration parameters:
     cache_timeout: refresh interval for this module (default 10)
-    format: display format for this module (default 'selinux: {state}')
+    format: display format for this module (default 'SELinux: {state}')
     state_disabled: show when no SELinux policy is loaded.
         (default 'disabled')
     state_enforcing: show when SELinux security policy is enforced.
@@ -30,17 +30,17 @@
 @license BSD
 
 SAMPLE OUTPUT
-{'full_text': 'selinux: enforcing', 'color': '#00FF00'}
+{'full_text': 'SELinux: enforcing', 'color': '#00FF00'}
 
 permissive
-{'full_text': 'selinux: permissive', 'color': '#FFFF00'}
+{'full_text': 'SELinux: permissive', 'color': '#FFFF00'}
 
 disabled
-{'full_text': 'selinux: disabled', 'color': '#FF0000'}
+{'full_text': 'SELinux: disabled', 'color': '#FF0000'}
 """
+
 from __future__ import absolute_import
 import selinux
-STRING_UNAVAILABLE = "selinux: isn't installed"
 
 
 class Py3status:
@@ -48,30 +48,28 @@
     """
     # available configuration parameters
     cache_timeout = 10
-    format = 'selinux: {state}'
+    format = 'SELinux: {state}'
     state_disabled = 'disabled'
     state_enforcing = 'enforcing'
     state_permissive = 'permissive'
 
     def selinux(self):
-        if not self.py3.check_commands(['getenforce']):
-            return {'cache_until': self.py3.CACHE_FOREVER,
-                    'color': self.py3.COLOR_BAD,
-                    'full_text': STRING_UNAVAILABLE}
         try:
             if selinux.security_getenforce():
                 state = self.state_enforcing
                 color = self.py3.COLOR_GOOD
             else:
                 state = self.state_permissive
-                color = self.py3.COLOR_BAD
+                color = self.py3.COLOR_DEGRADED
         except:
             state = self.state_disabled
             color = self.py3.COLOR_BAD
 
-        return {'cached_until': self.py3.time_in(self.cache_timeout),
-                'full_text': self.py3.safe_format(self.format, {'state': state}),
-                'color': color}
+        return {
+            'cached_until': self.py3.time_in(self.cache_timeout),
+            'full_text': self.py3.safe_format(self.format, {'state': state}),
+            'color': color
+        }
 
 
 if __name__ == '__main__':

{"golden_diff": "diff --git a/py3status/modules/selinux.py b/py3status/modules/selinux.py\n--- a/py3status/modules/selinux.py\n+++ b/py3status/modules/selinux.py\n@@ -3,11 +3,11 @@\n Display SELinux state.\n \n This module displays the state of SELinux on your machine:\n-Enforcing (good), Permissive (bad), or Disabled (bad).\n+Enforcing (good), Permissive (degraded), or Disabled (bad).\n \n Configuration parameters:\n     cache_timeout: refresh interval for this module (default 10)\n-    format: display format for this module (default 'selinux: {state}')\n+    format: display format for this module (default 'SELinux: {state}')\n     state_disabled: show when no SELinux policy is loaded.\n         (default 'disabled')\n     state_enforcing: show when SELinux security policy is enforced.\n@@ -30,17 +30,17 @@\n @license BSD\n \n SAMPLE OUTPUT\n-{'full_text': 'selinux: enforcing', 'color': '#00FF00'}\n+{'full_text': 'SELinux: enforcing', 'color': '#00FF00'}\n \n permissive\n-{'full_text': 'selinux: permissive', 'color': '#FFFF00'}\n+{'full_text': 'SELinux: permissive', 'color': '#FFFF00'}\n \n disabled\n-{'full_text': 'selinux: disabled', 'color': '#FF0000'}\n+{'full_text': 'SELinux: disabled', 'color': '#FF0000'}\n \"\"\"\n+\n from __future__ import absolute_import\n import selinux\n-STRING_UNAVAILABLE = \"selinux: isn't installed\"\n \n \n class Py3status:\n@@ -48,30 +48,28 @@\n     \"\"\"\n     # available configuration parameters\n     cache_timeout = 10\n-    format = 'selinux: {state}'\n+    format = 'SELinux: {state}'\n     state_disabled = 'disabled'\n     state_enforcing = 'enforcing'\n     state_permissive = 'permissive'\n \n     def selinux(self):\n-        if not self.py3.check_commands(['getenforce']):\n-            return {'cache_until': self.py3.CACHE_FOREVER,\n-                    'color': self.py3.COLOR_BAD,\n-                    'full_text': STRING_UNAVAILABLE}\n         try:\n             if selinux.security_getenforce():\n                 state = self.state_enforcing\n                 color = self.py3.COLOR_GOOD\n             else:\n                 state = self.state_permissive\n-                color = self.py3.COLOR_BAD\n+                color = self.py3.COLOR_DEGRADED\n         except:\n             state = self.state_disabled\n             color = self.py3.COLOR_BAD\n \n-        return {'cached_until': self.py3.time_in(self.cache_timeout),\n-                'full_text': self.py3.safe_format(self.format, {'state': state}),\n-                'color': color}\n+        return {\n+            'cached_until': self.py3.time_in(self.cache_timeout),\n+            'full_text': self.py3.safe_format(self.format, {'state': state}),\n+            'color': color\n+        }\n \n \n if __name__ == '__main__':\n", "issue": "selinux module install check refers to binary not in user path\nThe selinux module tries to check whether selinux is installed.\r\n\r\n`if not self.py3.check_commands(['getenforce']):`\r\n\r\nthis effectively runs `which getenforce`. The getenforce binary is installed under /usr/sbin (gentoo, also fedora as far as i read) which is not in the regular user path and therefore not found, resulting in the message `selinux: isn't installed`.\r\nRemoving the check makes the module work as expected.\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"\nDisplay SELinux state.\n\nThis module displays the state of SELinux on your machine:\nEnforcing (good), Permissive (bad), or Disabled (bad).\n\nConfiguration parameters:\n    cache_timeout: refresh interval for this module (default 10)\n    format: display format for this module (default 'selinux: {state}')\n    state_disabled: show when no SELinux policy is loaded.\n        (default 'disabled')\n    state_enforcing: show when SELinux security policy is enforced.\n        (default 'enforcing')\n    state_permissive: show when SELinux prints warnings instead of enforcing.\n        (default 'permissive')\n\nFormat placeholders:\n    {state} SELinux state\n\nColor options:\n    color_bad: Enforcing\n    color_degraded: Permissive\n    color_good: Disabled\n\nRequires:\n    libselinux-python: SELinux python bindings for libselinux\n\n@author bstinsonmhk\n@license BSD\n\nSAMPLE OUTPUT\n{'full_text': 'selinux: enforcing', 'color': '#00FF00'}\n\npermissive\n{'full_text': 'selinux: permissive', 'color': '#FFFF00'}\n\ndisabled\n{'full_text': 'selinux: disabled', 'color': '#FF0000'}\n\"\"\"\nfrom __future__ import absolute_import\nimport selinux\nSTRING_UNAVAILABLE = \"selinux: isn't installed\"\n\n\nclass Py3status:\n    \"\"\"\n    \"\"\"\n    # available configuration parameters\n    cache_timeout = 10\n    format = 'selinux: {state}'\n    state_disabled = 'disabled'\n    state_enforcing = 'enforcing'\n    state_permissive = 'permissive'\n\n    def selinux(self):\n        if not self.py3.check_commands(['getenforce']):\n            return {'cache_until': self.py3.CACHE_FOREVER,\n                    'color': self.py3.COLOR_BAD,\n                    'full_text': STRING_UNAVAILABLE}\n        try:\n            if selinux.security_getenforce():\n                state = self.state_enforcing\n                color = self.py3.COLOR_GOOD\n            else:\n                state = self.state_permissive\n                color = self.py3.COLOR_BAD\n        except:\n            state = self.state_disabled\n            color = self.py3.COLOR_BAD\n\n        return {'cached_until': self.py3.time_in(self.cache_timeout),\n                'full_text': self.py3.safe_format(self.format, {'state': state}),\n                'color': color}\n\n\nif __name__ == '__main__':\n    \"\"\"\n    Run module in test mode.\n    \"\"\"\n    from py3status.module_test import module_test\n    module_test(Py3status)\n", "path": "py3status/modules/selinux.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"\nDisplay SELinux state.\n\nThis module displays the state of SELinux on your machine:\nEnforcing (good), Permissive (degraded), or Disabled (bad).\n\nConfiguration parameters:\n    cache_timeout: refresh interval for this module (default 10)\n    format: display format for this module (default 'SELinux: {state}')\n    state_disabled: show when no SELinux policy is loaded.\n        (default 'disabled')\n    state_enforcing: show when SELinux security policy is enforced.\n        (default 'enforcing')\n    state_permissive: show when SELinux prints warnings instead of enforcing.\n        (default 'permissive')\n\nFormat placeholders:\n    {state} SELinux state\n\nColor options:\n    color_bad: Enforcing\n    color_degraded: Permissive\n    color_good: Disabled\n\nRequires:\n    libselinux-python: SELinux python bindings for libselinux\n\n@author bstinsonmhk\n@license BSD\n\nSAMPLE OUTPUT\n{'full_text': 'SELinux: enforcing', 'color': '#00FF00'}\n\npermissive\n{'full_text': 'SELinux: permissive', 'color': '#FFFF00'}\n\ndisabled\n{'full_text': 'SELinux: disabled', 'color': '#FF0000'}\n\"\"\"\n\nfrom __future__ import absolute_import\nimport selinux\n\n\nclass Py3status:\n    \"\"\"\n    \"\"\"\n    # available configuration parameters\n    cache_timeout = 10\n    format = 'SELinux: {state}'\n    state_disabled = 'disabled'\n    state_enforcing = 'enforcing'\n    state_permissive = 'permissive'\n\n    def selinux(self):\n        try:\n            if selinux.security_getenforce():\n                state = self.state_enforcing\n                color = self.py3.COLOR_GOOD\n            else:\n                state = self.state_permissive\n                color = self.py3.COLOR_DEGRADED\n        except:\n            state = self.state_disabled\n            color = self.py3.COLOR_BAD\n\n        return {\n            'cached_until': self.py3.time_in(self.cache_timeout),\n            'full_text': self.py3.safe_format(self.format, {'state': state}),\n            'color': color\n        }\n\n\nif __name__ == '__main__':\n    \"\"\"\n    Run module in test mode.\n    \"\"\"\n    from py3status.module_test import module_test\n    module_test(Py3status)\n", "path": "py3status/modules/selinux.py"}]}