# HG changeset patch # User Goffi # Date 1503439710 -7200 # Node ID 78ffb9ce57a4efc2583bcdd2f72e31377ba61890 # Parent ca1ab42c7ae9cd0d4bed8a678d94af0643c0a744 jp (common): fixed empty table display when headers are specified diff -r ca1ab42c7ae9 -r 78ffb9ce57a4 frontends/src/jp/common.py --- a/frontends/src/jp/common.py Tue Aug 22 22:13:22 2017 +0200 +++ b/frontends/src/jp/common.py Wed Aug 23 00:08:30 2017 +0200 @@ -555,6 +555,10 @@ 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: