From: Tomer Haskalovitch Date: Tue, 12 Aug 2025 05:49:09 +0000 (+0300) Subject: mgr/dashboard: catch more exception to show relevant cli output X-Git-Tag: testing/wip-jcollin-testing-20250905.013110-tentacle~11^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=e4c99aa9b13dfd98a36098ea08288b0130173d60;p=ceph-ci.git mgr/dashboard: catch more exception to show relevant cli output Signed-off-by: Tomer Haskalovitch (cherry picked from commit 677c2c2f3275f6669dbff2e75b5a2d871635a6f2) --- diff --git a/src/pybind/mgr/dashboard/services/nvmeof_cli.py b/src/pybind/mgr/dashboard/services/nvmeof_cli.py index c662a7fd7d5..45624d95b32 100644 --- a/src/pybind/mgr/dashboard/services/nvmeof_cli.py +++ b/src/pybind/mgr/dashboard/services/nvmeof_cli.py @@ -10,7 +10,6 @@ from mgr_module import CLICheckNonemptyFileInput, CLICommand, CLIReadCommand, \ CLIWriteCommand, HandleCommandResult, HandlerFuncType from prettytable import PrettyTable -from ..exceptions import DashboardException from ..model.nvmeof import CliFlags, CliHeader from ..rest_client import RequestException from .nvmeof_conf import ManagedByOrchestratorException, \ @@ -267,5 +266,5 @@ class NvmeofCLICommand(CLICommand): return HandleCommandResult(-errno.EINVAL, '', f"format '{out_format}' is not implemented") return HandleCommandResult(0, out, '') - except DashboardException as e: + except Exception as e: # pylint: disable=broad-except return HandleCommandResult(-errno.EINVAL, '', str(e))