Commit 081214c1 authored by Romain Bignon's avatar Romain Bignon
Browse files

table formatter: convert lists to displayable ones

parent 139760e8
......@@ -88,7 +88,7 @@ def get_formatted_table(self):
for line in queue:
for _ in range(maxrow - len(line)):
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())
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment