diff options
author | Dmitrii Agibov <dmitrii.agibov@arm.com> | 2022-12-13 09:39:21 +0000 |
---|---|---|
committer | Dmitrii Agibov <dmitrii.agibov@arm.com> | 2022-12-16 09:25:21 +0000 |
commit | 8da6441c87532d20d3c8dad538e46dc99d073927 (patch) | |
tree | 6afb7f0c82c5c357f7497413f0e18473e84d472c /src/mlia/cli/main.py | |
parent | ba9aeace4c3d3f4f31830d68b5cc7dd3f4bf1dde (diff) | |
download | mlia-8da6441c87532d20d3c8dad538e46dc99d073927.tar.gz |
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
Diffstat (limited to 'src/mlia/cli/main.py')
-rw-r--r-- | src/mlia/cli/main.py | 9 |
1 files changed, 9 insertions, 0 deletions
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", |