diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Bcfg2/Client/Tools/SELinux.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/Bcfg2/Client/Tools/SELinux.py b/src/lib/Bcfg2/Client/Tools/SELinux.py index 9dbc48b9e..77937c70c 100644 --- a/src/lib/Bcfg2/Client/Tools/SELinux.py +++ b/src/lib/Bcfg2/Client/Tools/SELinux.py @@ -801,12 +801,12 @@ class SELinuxModuleHandler(SELinuxEntryHandler): def Install(self, entry, _=None): if not self.filetool.install(self._pathentry(entry)): return False - try: + if hasattr(self, 'records'): # if seobject has the moduleRecords attribute, install the # module using the seobject library self.records # pylint: disable=W0104 return self._install_seobject(entry) - except AttributeError: + else: # seobject doesn't have the moduleRecords attribute, so # install the module using `semodule` self.logger.debug("Installing %s using semodule" % |