summaryrefslogtreecommitdiffstats
path: root/ipapython
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2019-06-04 12:18:46 -0400
committerFlorence Blanc-Renaud <flo@redhat.com>2019-06-07 11:24:45 +0200
commit1284bf1588877d3549ddc98e4762038b8740c72e (patch)
treebd5c32adb6d4b60a9389d5be72d36fac82d5547d /ipapython
parent1d03afc908d7135609e2777de3fa6f9dcc9de9ed (diff)
downloadfreeipa-1284bf1588877d3549ddc98e4762038b8740c72e.tar.gz
freeipa-1284bf1588877d3549ddc98e4762038b8740c72e.tar.xz
freeipa-1284bf1588877d3549ddc98e4762038b8740c72e.zip
Drop list of return values to be ignored in AdminTool
This was an attempt to suppress client uninstallation failure messages in the server uninstallation script. This method inadvertently also suppressed client uninstallation messages and was generally confusing. This reverts part of b96906156be37a7b29ee74423b82f04070c84e22 https://pagure.io/freeipa/issue/7836 Signed-off-by: Rob Crittenden <rcritten@redhat.com> Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Diffstat (limited to 'ipapython')
-rw-r--r--ipapython/admintool.py3
-rw-r--r--ipapython/install/cli.py11
2 files changed, 3 insertions, 11 deletions
diff --git a/ipapython/admintool.py b/ipapython/admintool.py
index 1bb953f4f..5fe8a5fa6 100644
--- a/ipapython/admintool.py
+++ b/ipapython/admintool.py
@@ -93,7 +93,6 @@ class AdminTool:
log_file_name = None
usage = None
description = None
- ignore_return_codes = ()
_option_parsers = dict()
@@ -184,7 +183,7 @@ class AdminTool:
return_value = exception.rval # pylint: disable=no-member
traceback = sys.exc_info()[2]
error_message, return_value = self.handle_error(exception)
- if return_value and return_value not in self.ignore_return_codes:
+ if return_value:
self.log_failure(error_message, return_value, exception,
traceback)
return return_value
diff --git a/ipapython/install/cli.py b/ipapython/install/cli.py
index 2c95a20c6..1bcac67b9 100644
--- a/ipapython/install/cli.py
+++ b/ipapython/install/cli.py
@@ -58,8 +58,7 @@ def _get_usage(configurable_class):
def install_tool(configurable_class, command_name, log_file_name,
debug_option=False, verbose=False, console_format=None,
- use_private_ccache=True, uninstall_log_file_name=None,
- ignore_return_codes=()):
+ use_private_ccache=True, uninstall_log_file_name=None):
"""
Some commands represent multiple related tools, e.g.
``ipa-server-install`` and ``ipa-server-install --uninstall`` would be
@@ -73,8 +72,6 @@ def install_tool(configurable_class, command_name, log_file_name,
:param console_format: logging format for stderr
:param use_private_ccache: a temporary ccache is created and used
:param uninstall_log_file_name: if not None the log for uninstall
- :param ignore_return_codes: tuple of error codes to not log errors
- for. Let the caller do it if it wants.
"""
if uninstall_log_file_name is not None:
uninstall_kwargs = dict(
@@ -84,7 +81,6 @@ def install_tool(configurable_class, command_name, log_file_name,
debug_option=debug_option,
verbose=verbose,
console_format=console_format,
- ignore_return_codes=ignore_return_codes,
)
else:
uninstall_kwargs = None
@@ -102,14 +98,12 @@ def install_tool(configurable_class, command_name, log_file_name,
console_format=console_format,
uninstall_kwargs=uninstall_kwargs,
use_private_ccache=use_private_ccache,
- ignore_return_codes=ignore_return_codes,
)
)
def uninstall_tool(configurable_class, command_name, log_file_name,
- debug_option=False, verbose=False, console_format=None,
- ignore_return_codes=()):
+ debug_option=False, verbose=False, console_format=None):
return type(
'uninstall_tool({0})'.format(configurable_class.__name__),
(UninstallTool,),
@@ -121,7 +115,6 @@ def uninstall_tool(configurable_class, command_name, log_file_name,
debug_option=debug_option,
verbose=verbose,
console_format=console_format,
- ignore_return_codes=ignore_return_codes,
)
)