From e4c99aa9b13dfd98a36098ea08288b0130173d60 Mon Sep 17 00:00:00 2001 From: Tomer Haskalovitch Date: Tue, 12 Aug 2025 08:49:09 +0300 Subject: [PATCH] mgr/dashboard: catch more exception to show relevant cli output Signed-off-by: Tomer Haskalovitch (cherry picked from commit 677c2c2f3275f6669dbff2e75b5a2d871635a6f2) --- src/pybind/mgr/dashboard/services/nvmeof_cli.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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)) -- 2.39.5