Fix --hide-excluded on CLI

This commit is contained in:
RunasSudo 2021-01-15 18:24:06 +11:00
parent a97b832b14
commit 37895d03ca
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -80,7 +80,7 @@ def print_step(args, stage, result):
if state is None:
print('- {}: {} ({})'.format(candidate.name, ppVotes, ppTransfers))
else:
if not (args.hide_excluded and state == 'Excluded' and float(ppVotes) == 0 and float(ppTransfers) == 0):
if not (args.hide_excluded and (count_card.state == pyRCV2.model.CandidateState.EXCLUDED or count_card.state == pyRCV2.model.CandidateState.EXCLUDING) and float(ppVotes) == 0 and float(ppTransfers) == 0):
print('- {}: {} ({}) - {}'.format(candidate.name, ppVotes, ppTransfers, state))
print('Exhausted: {} ({})'.format(result.exhausted.votes.pp(args.pp_decimals), result.exhausted.transfers.pp(args.pp_decimals)))