jp (common): fixed empty table display when headers are specified
This commit is contained in:
parent
caa64d5118
commit
40fa0ed846
1 changed files with 4 additions and 0 deletions
|
|
@ -555,6 +555,10 @@ class Table(object):
|
|||
raise exceptions.DataError(u'rows size is not coherent')
|
||||
self.rows.append(new_row)
|
||||
|
||||
if not data and headers is not None:
|
||||
# the table is empty, we print headers at their lenght
|
||||
self.sizes = [len(h) for h in headers]
|
||||
|
||||
@staticmethod
|
||||
def readDictValues(data, keys, defaults=None):
|
||||
if defaults is None:
|
||||
|
|
|
|||
Loading…
Reference in a new issue