diff options
author | Sol Jerome <sol.jerome@gmail.com> | 2012-09-25 18:07:32 -0500 |
---|---|---|
committer | Sol Jerome <sol.jerome@gmail.com> | 2012-09-25 18:07:32 -0500 |
commit | 59c098f90a27b48d1bf28d60b0b24ce1ad00fd75 (patch) | |
tree | 5fa47e35fe61ce83bf908706a24ae3a1993d45aa /src/lib/Bcfg2/Client | |
parent | b16405c44be8177ca21d9ea1219e51d8f352eca1 (diff) | |
download | bcfg2-59c098f90a27b48d1bf28d60b0b24ce1ad00fd75.tar.gz bcfg2-59c098f90a27b48d1bf28d60b0b24ce1ad00fd75.tar.bz2 bcfg2-59c098f90a27b48d1bf28d60b0b24ce1ad00fd75.zip |
SELinux: Check for attribute explicitly
Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
Diffstat (limited to 'src/lib/Bcfg2/Client')
-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" % |