From dcaf57271c91f75733e42048683a04bde4ea9b2a Mon Sep 17 00:00:00 2001 From: Martin Basti Date: Mon, 23 Nov 2015 13:38:11 +0100 Subject: [PATCH] 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 Reviewed-By: Jan Cholasta --- ipaserver/install/ipa_kra_install.py | 9 +++------ 1 file 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