case-insensitive sort for human-readable logger (#289)

This commit is contained in:
James Alan Preiss
2018-11-13 11:09:11 -08:00
committed by pzhokhov
parent 0a13da8dfe
commit 5cd66010dc

View File

@@ -54,7 +54,7 @@ class HumanOutputFormat(KVWriter, SeqWriter):
# Write out the data
dashes = '-' * (keywidth + valwidth + 7)
lines = [dashes]
for (key, val) in sorted(key2str.items()):
for (key, val) in sorted(key2str.items(), key=lambda kv: kv[0].lower()):
lines.append('| %s%s | %s%s |' % (
key,
' ' * (keywidth - len(key)),