From ffa5902daad453c5f6ff0e44aae0e4e6c6c16a9f Mon Sep 17 00:00:00 2001
From: Seblu <sebastien.luttringer@smartjog.com>
Date: Wed, 2 Mar 2011 19:50:23 +0100
Subject: [PATCH] fix bad alignment in list -l

---
 cccli/command/list.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cccli/command/list.py b/cccli/command/list.py
index 9e2e5d9..f0b2964 100644
--- a/cccli/command/list.py
+++ b/cccli/command/list.py
@@ -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):
-- 
GitLab