Commit 9fe72672 authored by Michael Hanselmann's avatar Michael Hanselmann

cli.GenerateTable: Don't write EOL spaces

With this change, there won't be unnecessary space characters
at the end of lines.
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 9fa2e150
......@@ -1575,7 +1575,10 @@ def GenerateTable(headers, fields, separator, data,
for idx, name in enumerate(fields):
hdr = headers[name]
if separator is None:
mlens[idx] = max(mlens[idx], len(hdr))
if idx == len(fields) - 1 and not numfields.Matches(name):
mlens[idx] = 0
else:
mlens[idx] = max(mlens[idx], len(hdr))
args.append(mlens[idx])
args.append(hdr)
result.append(format % tuple(args))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment