From 402246a72990f77591f5efaec7ff0bc0cf82f416 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Cami?= Date: Mon, 29 Jul 2019 11:22:09 +0200 Subject: [PATCH] ipapython/admintool.py: use SERVER_NOT_CONFIGURED MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 9182917280a5c2590fa677729db54b38a9ac4d1f introduced SUCCESS, SERVER_INSTALL_ERROR and SERVER_NOT_CONFIGURED to deal with cases when server is not configured. Actually use SERVER_NOT_CONFIGURED in log_failure instead of 2. Related-to: https://pagure.io/freeipa/issue/6843 Signed-off-by: François Cami Reviewed-By: Alexander Bokovoy Reviewed-By: Rob Crittenden --- ipapython/admintool.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ipapython/admintool.py b/ipapython/admintool.py index 5aa8cf1e934..ededb28bfd8 100644 --- a/ipapython/admintool.py +++ b/ipapython/admintool.py @@ -317,9 +317,7 @@ def log_failure(self, error_message, return_value, exception, backtrace): # ipa-server-install. return message = "The %s command failed." % self.command_name - if self.log_file_initialized and return_value != 2: - # magic value because this is common between server and client - # but imports are not straigthforward + if self.log_file_initialized and return_value != SERVER_NOT_CONFIGURED: message += " See %s for more information" % self.log_file_name logger.error('%s', message)