summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2015-11-23 13:38:11 +0100
committerMartin Basti <mbasti@redhat.com>2015-11-27 16:14:06 +0100
commitdcaf57271c91f75733e42048683a04bde4ea9b2a (patch)
treea1e7b9bceb91ab38f81b13f1c14b6dfeeda48323
parentfa2fbc680aea8f9cb43238ae0103e5030324f3f6 (diff)
KRA install: show installation message only if install really started
Message that installation started/failed was shown even when install_check fail (installation itself did not start). This commit show messages only if installation started. Enhacement for https://fedorahosted.org/freeipa/ticket/5455 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
-rw-r--r--ipaserver/install/ipa_kra_install.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/ipaserver/install/ipa_kra_install.py b/ipaserver/install/ipa_kra_install.py
index d8fbf580e..79b4ae899 100644
--- a/ipaserver/install/ipa_kra_install.py
+++ b/ipaserver/install/ipa_kra_install.py
@@ -152,7 +152,7 @@ class KRAInstaller(KRAInstall):
raise admintool.ScriptError(
"Directory Manager password required")
- def _run(self):
+ def run(self):
super(KRAInstaller, self).run()
if not cainstance.is_ca_installed_locally():
@@ -174,8 +174,6 @@ class KRAInstaller(KRAInstall):
raise RuntimeError("Too many parameters provided. "
"No replica file is required.")
- print(dedent(self.INSTALLER_START_MESSAGE))
-
self.options.dm_password = self.options.password
self.options.setup_ca = False
@@ -217,11 +215,10 @@ class KRAInstaller(KRAInstall):
except RuntimeError as e:
raise admintool.ScriptError(str(e))
- kra.install(api, config, self.options)
+ print(dedent(self.INSTALLER_START_MESSAGE))
- def run(self):
try:
- self._run()
+ kra.install(api, config, self.options)
except:
self.log.error(dedent(self.FAIL_MESSAGE))
raise