1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Make exception more specific (OSError) in setup module for selinux call

This commit is contained in:
Stephen Fromm 2012-08-08 08:56:12 -07:00
parent 3fb3eae7b6
commit 0cc73c930b

View file

@ -126,7 +126,7 @@ class Facts(object):
self.facts['selinux']['status'] = 'enabled' self.facts['selinux']['status'] = 'enabled'
try: try:
self.facts['selinux']['policyvers'] = selinux.security_policyvers() self.facts['selinux']['policyvers'] = selinux.security_policyvers()
except: except OSError, e:
self.facts['selinux']['policyvers'] = 'unknown' self.facts['selinux']['policyvers'] = 'unknown'
try: try:
(rc, configmode) = selinux.selinux_getenforcemode() (rc, configmode) = selinux.selinux_getenforcemode()