From d317a293f099e65cbef395158c01b97fe579e591 Mon Sep 17 00:00:00 2001 From: Matej Matuska Date: Fri, 11 Aug 2023 15:04:54 +0200 Subject: [PATCH] Use new leapp output apis Leapp introduced new output apis (and removed some other). See https://github.com/oamg/leapp/pull/840 for details. --- commands/preupgrade/__init__.py | 5 ++--- commands/upgrade/__init__.py | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/commands/preupgrade/__init__.py b/commands/preupgrade/__init__.py index 15a9311064..032094199b 100644 --- a/commands/preupgrade/__init__.py +++ b/commands/preupgrade/__init__.py @@ -9,7 +9,7 @@ from leapp.logger import configure_logger from leapp.utils.audit import Execution from leapp.utils.clicmd import command, command_opt -from leapp.utils.output import beautify_actor_exception, report_errors, report_info, report_inhibitors +from leapp.utils.output import beautify_actor_exception, report_errors, report_info @command('preupgrade', help='Generate preupgrade report') @@ -77,10 +77,9 @@ def preupgrade(args, breadcrumbs): workflow.save_answers(answerfile_path, userchoices_path) util.generate_report_files(context, report_schema) report_errors(workflow.errors) - report_inhibitors(context) report_files = util.get_cfg_files('report', cfg) log_files = util.get_cfg_files('logs', cfg) - report_info(context, report_files, log_files, answerfile_path, fail=workflow.failure) + report_info(context, report_files, log_files, answerfile_path, fail=workflow.failure, errors=workflow.errors) if workflow.failure: sys.exit(1) diff --git a/commands/upgrade/__init__.py b/commands/upgrade/__init__.py index aa327c3ba5..18edcb9b2b 100644 --- a/commands/upgrade/__init__.py +++ b/commands/upgrade/__init__.py @@ -9,7 +9,7 @@ from leapp.logger import configure_logger from leapp.utils.audit import Execution from leapp.utils.clicmd import command, command_opt -from leapp.utils.output import beautify_actor_exception, report_errors, report_info, report_inhibitors +from leapp.utils.output import beautify_actor_exception, report_errors, report_info # NOTE: # If you are adding new parameters please ensure that they are set in the upgrade function invocation in `rerun` @@ -106,11 +106,10 @@ def upgrade(args, breadcrumbs): logger.info("Answerfile will be created at %s", answerfile_path) workflow.save_answers(answerfile_path, userchoices_path) report_errors(workflow.errors) - report_inhibitors(context) util.generate_report_files(context, report_schema) report_files = util.get_cfg_files('report', cfg) log_files = util.get_cfg_files('logs', cfg) - report_info(context, report_files, log_files, answerfile_path, fail=workflow.failure) + report_info(context, report_files, log_files, answerfile_path, fail=workflow.failure, errors=workflow.errors) if workflow.failure: sys.exit(1)