From 8da6441c87532d20d3c8dad538e46dc99d073927 Mon Sep 17 00:00:00 2001 From: Dmitrii Agibov Date: Tue, 13 Dec 2022 09:39:21 +0000 Subject: MLIA-460 Revisit backend management - Provide command for backend installation in case if backend is not available - Fix issue with connection timeout during downloading - Show installation tools output only in verbose mode Change-Id: Ic0e495ba19879cc2cda4fd0bce20b57ba896cfeb --- src/mlia/cli/main.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/mlia/cli') diff --git a/src/mlia/cli/main.py b/src/mlia/cli/main.py index 33a44e1..98fdb63 100644 --- a/src/mlia/cli/main.py +++ b/src/mlia/cli/main.py @@ -11,6 +11,7 @@ from inspect import signature from pathlib import Path from mlia import __version__ +from mlia.backend.errors import BackendUnavailableError from mlia.cli.commands import all_tests from mlia.cli.commands import backend_install from mlia.cli.commands import backend_list @@ -225,6 +226,14 @@ def run_command(args: argparse.Namespace) -> int: logger.error("Internal error: %s", err) except ConfigurationError as err: logger.error(err) + except BackendUnavailableError as err: + logger.error("Error: Backend %s is not available.", err.backend) + # apart from tosa-checker all other backends are currently optional + if err.backend in ("tosa-checker",): + logger.error( + 'Please use next command to install it: mlia-backend install "%s"', + err.backend, + ) except Exception as err: # pylint: disable=broad-except logger.error( "\nExecution finished with error: %s", -- cgit v1.2.1