This is an automated email from the git hooks/post-receive script.
spichugi pushed a commit to branch 389-ds-base-1.4.1 in repository 389-ds-base.
commit 4e32c54971f2d4fcbb5926c81c6eb46c8bb525f4 Author: Simon Pichugin spichugi@redhat.com AuthorDate: Mon Oct 21 18:25:20 2019 +0200
Issue 50634 - Clean up CLI errors output - Fix wrong exception
Description: The previous commit takes care only about ValueError evaluation. But it is possible that other exceptions will be raised which will result in a wrong error output. Make the exception object more general.
https://pagure.io/389-ds-base/issue/50634
Reviewed by: ? --- src/lib389/lib389/cli_base/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lib389/lib389/cli_base/__init__.py b/src/lib389/lib389/cli_base/__init__.py index 23fc312..12b1c51 100644 --- a/src/lib389/lib389/cli_base/__init__.py +++ b/src/lib389/lib389/cli_base/__init__.py @@ -423,6 +423,6 @@ def format_error_to_dict(exception): errmsg = str(exception) try: msg = ast.literal_eval(errmsg) - except ValueError: + except Exception: msg = {'desc': errmsg} return msg
389-commits@lists.fedoraproject.org