Skip to content

Commit ed06bbf

Browse files
plageatpkratoch
authored andcommitted
For those long multiline modular summary tags, tranform them into
one-liners before showing in 'module list'. So, we prevent showing extra '\x0a'('\n') in result table
1 parent 4763920 commit ed06bbf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dnf/module/module_base.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,9 @@ def _profile_report_formatter(self, modulePackage, default_profiles, enabled_str
579579
else ", "
580580
return profiles_str[:-2]
581581

582+
def _summary_report_formatter(self, summary):
583+
return summary.strip().replace("\n", " ")
584+
582585
def _module_strs_formatter(self, modulePackage, markActive=False):
583586
default_str = ""
584587
enabled_str = ""
@@ -761,7 +764,8 @@ def _create_and_fill_table(self, latest):
761764
column_stream).setData(
762765
modulePackage.getStream() + default_str + enabled_str + disabled_str)
763766
line.getColumnCell(column_profiles).setData(profiles_str)
764-
line.getColumnCell(column_info).setData(modulePackage.getSummary())
767+
summary_str = self._summary_report_formatter(modulePackage.getSummary())
768+
line.getColumnCell(column_info).setData(summary_str)
765769

766770
return table
767771

0 commit comments

Comments
 (0)