Skip to content

Commit

Permalink
Fix: report msg not generated at the end of run
Browse files Browse the repository at this point in the history
At the end of "leapp upgrade" run we do not print message
about generated reports, in contrast to "leapp preupgrade"
where we do.
  • Loading branch information
Rezney committed Nov 12, 2019
1 parent a83c46f commit df0e349
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions leapp/cli/upgrade/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ def upgrade(args):
report_errors(workflow.errors)
generate_report_files(context)

cfg = get_config()
report_files = [os.path.join(cfg.get('report', 'dir'), r) for r in cfg.get('report', 'files').split(',')]
report_info([rf for rf in report_files if os.path.isfile(rf)], fail=workflow.failure)

if workflow.failure:
sys.exit(1)

Expand Down
5 changes: 3 additions & 2 deletions leapp/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
'leapp-preupgrade.log',
'leapp-upgrade.log',
]
# files that will get reported at the end of a preupgrade run if they were created/modified during it
# files that will get reported at the end of a preupgrade/upgrade run if they were created/modified during it
_FILES_TO_REPORT = [
'leapp-report.json',
'leapp-report.txt',
'leapp-preupgrade.log',
'leapp-upgrade.log',
'leapp-preupgrade.log'
]
_CONFIG_DEFAULTS = {
'archive': {
Expand Down

0 comments on commit df0e349

Please sign in to comment.