Skip to content
Snippets Groups Projects
Commit ffa5902d authored by Seblu's avatar Seblu
Browse files

fix bad alignment in list -l

parent 597cadcc
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,7 @@ class Command_list(TqlCommand):
tags = dict()
for o in objs["objects"]:
for (t,v) in o.items():
tags[t] = max(len(self.tdr(t, v)), tags.get(t, len(t)))
tags[t] = max(len(self.tdr(t, v)), tags.get(t, 0))
# build initial print order
order = [ t for t in objs.get("order", []) if t in tags ]
order.extend(sorted(set(tags.keys()) - set(order)))
......@@ -58,9 +58,9 @@ class Command_list(TqlCommand):
line = ""
for t in order:
line += "%s%s:%s%s "%(self.tdtc(t),
t,
self.tdc(t),
self.tdr(t, o.get(t, u"")).ljust(tags[t]))
t,
self.tdc(t),
self.tdr(t, o.get(t, u"")).ljust(tags[t]))
self.printer.out("%s%s"%(line, color["reset"]))
def list_table(self, objs):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment