diff --git a/repos/system_upgrade/common/actors/checkcustommodifications/libraries/checkcustommodifications.py b/repos/system_upgrade/common/actors/checkcustommodifications/libraries/checkcustommodifications.py index c0250996c7..105dda3e4b 100644 --- a/repos/system_upgrade/common/actors/checkcustommodifications/libraries/checkcustommodifications.py +++ b/repos/system_upgrade/common/actors/checkcustommodifications/libraries/checkcustommodifications.py @@ -2,20 +2,23 @@ from leapp.libraries.stdlib import api from leapp.models import CustomModifications +FMT_LIST_SEPARATOR = "\n - " + def _create_report(msgs, report_type, component=None, hint=None): filtered_msgs = [m for m in msgs or [] if m.type == report_type and (not component or m.component == component)] if not filtered_msgs: # Nothing to report return - discovered_files = '\n'.join( - ['- {filename}{actor}'.format(filename=m.filename, - actor=' ({} Actor)'.format(m.actor_name) if m.actor_name else '') + discovered_files = ''.join( + ['{sep}{filename}{actor}'.format(sep=FMT_LIST_SEPARATOR, + filename=m.filename, + actor=' ({} Actor)'.format(m.actor_name) if m.actor_name else '') for m in filtered_msgs]) component_str = 'leapp {}'.format(component) if component else 'leapp' title = '{report_type} files were discovered on the system in {component_str} directories' summary = ('Apparently some {report_type} files have been found in {component_str} installation directories.\n' - 'Please consult the list of discovered files for more information:\n' + 'Please consult the list of discovered files for more information:' '{discovered_files}') report_parts = [ reporting.Title(title.format(report_type=report_type.capitalize(), component_str=component_str)),