Commit 64cb7bbc authored by Vincent Stehlé's avatar Vincent Stehlé
Browse files ensure unique counts are strings

This fixes some crashes when using e.g. `--uniq --print --fields <list
without count in it>'.
Signed-off-by: Vincent Stehlé's avatarVincent Stehlé <>
parent bae4c0c3
...@@ -439,6 +439,10 @@ def uniq(cross_check): ...@@ -439,6 +439,10 @@ def uniq(cross_check):
h[i]['count'] += 1 h[i]['count'] += 1
# Transform all counts to string.
for k in h.keys():
h[k]['count'] = str(h[k]['count'])
# Transform back to list # Transform back to list
r = list(h.values()) r = list(h.values())"{len(r)} unique entries")"{len(r)} unique entries")
Supports Markdown
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