policycoreutils: gui: If you are not able to read enforcemode set it to False

Signed-off-by: Eric Paris <eparis@redhat.com>
This commit is contained in:
Dan Walsh 2013-01-21 14:04:56 -06:00 committed by Eric Paris
parent 3dd13f7d08
commit b2de32675a

View File

@ -177,7 +177,11 @@ class statusPage:
def read_selinux_config(self):
self.initialtype = selinux.selinux_getpolicytype()[1]
self.initEnabled = selinux.selinux_getenforcemode()[1]
try:
self.initEnabled = selinux.selinux_getenforcemode()[1]
except:
self.initEnabled = False
pass
self.enabled = self.initEnabled
self.enabledOptionMenu.set_active(self.enabled + 1 )