Skip to content
Snippets Groups Projects
Commit 9fe72672 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

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
No related branches found
No related tags found
No related merge requests found
......@@ -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))
......
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