fix: [readable] fix bug where the first value was missed

This commit is contained in:
Alexandre Dulaunoy 2020-10-13 07:32:04 +02:00
parent 9fb0cc8488
commit 04c3fc3cf7
Signed by: adulau
GPG key ID: 09E2CD4944E6CBCD

View file

@ -157,11 +157,9 @@ for anal in analysis:
if args.o == "csv":
print("{},{},{}".format(anal,a[0],a[1]))
elif args.o == "readable":
if previous_value is None:
previous_value = a[1]
elif previous_value == a[1]:
if previous_value == a[1]:
readable_table.append(["{}".format(a[0])])
elif a[1] < previous_value:
elif previous_value is None or a[1] < previous_value:
previous_value = a[1]
readable_table.append(["{} occurences".format(a[1])])
readable_table.append(["{}".format(a[0])])