mirror of https://github.com/n1nj4sec/pupy.git
term: format_table: handle case when column is absent
This commit is contained in:
parent
985b43d5e6
commit
6a65943f66
|
@ -264,7 +264,7 @@ def table_format(diclist, wl=[], bl=[], truncate=None, legend=True):
|
|||
|
||||
lines = []
|
||||
for key,_ in keys:
|
||||
value = c[key].strip()
|
||||
value = c.get(key, '').strip()
|
||||
lines.append(value.ljust(colsize[key]+2 + ediff(value)))
|
||||
|
||||
res.append(u''.join(lines))
|
||||
|
|
Loading…
Reference in New Issue