diff --git a/weboob/tools/application/formatters/table.py b/weboob/tools/application/formatters/table.py index 71adbe744e9e6c3ee28d2b07bdcc434e6c3aaecb..cb804dbaff9270fd75f4c6c1c4031b689d81a2a2 100644 --- a/weboob/tools/application/formatters/table.py +++ b/weboob/tools/application/formatters/table.py @@ -88,7 +88,7 @@ def get_formatted_table(self): for line in queue: for _ in range(maxrow - len(line)): line += ('',) - table.add_row(line) + table.add_row([self.format_cell(cell) for cell in line]) if self.HTML: s += table.get_html_string() @@ -99,6 +99,12 @@ def get_formatted_table(self): return s + def format_cell(self, cell): + if isinstance(cell, list): + return ', '.join(['%s' % item for item in cell]) + + return cell + def format_dict(self, item): if self.keys is None: self.keys = list(item.keys())