aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2018-04-30 14:21:05 +0100
committerBryn M. Reeves <bmr@redhat.com>2018-04-30 14:21:05 +0100
commit5f825d6e0660d8c9eaa8950413e27e86ebc5558f (patch)
tree00cef1a7f984af9c78e69cfebb82439dee4b8713
parent6781bab5215d7fe086b51e8a5ae901481ec48f5e (diff)
downloadsos-5f825d6e0660d8c9eaa8950413e27e86ebc5558f.tar.gz
[ipa] ensure that ipa_version is always set in setup()
Resolves: #1214 Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/ipa.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/sos/plugins/ipa.py b/sos/plugins/ipa.py
index 916df45a..3aeb2948 100644
--- a/sos/plugins/ipa.py
+++ b/sos/plugins/ipa.py
@@ -40,6 +40,7 @@ class Ipa(Plugin, RedHatPlugin):
elif self.is_installed("pki-common") \
or exists("/var/lib/pki-ca/"):
return "v3"
+ return None
def ca_installed(self):
# Follow the same checks as IPA CA installer code
@@ -86,10 +87,12 @@ class Ipa(Plugin, RedHatPlugin):
self.pki_tomcat_conf_dir_v4 = "/etc/pki/pki-tomcat/ca"
self.pki_tomcat_conf_dir_v3 = "/etc/pki-ca"
+ # Returns "v3", "v4", or None
+ ipa_version = self.check_ipa_server_version()
+
if self.ipa_server_installed():
self._log_debug("IPA server install detected")
- ipa_version = self.check_ipa_server_version()
self._log_debug("IPA version is [%s]" % ipa_version)
self.add_copy_spec([