Fix BLT export format

This commit is contained in:
RunasSudo 2021-10-16 22:12:22 +11:00
parent 913aac26ca
commit 8333dd7c2d
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -1,6 +1,6 @@
# Eos - Verifiable elections # Eos - Verifiable elections
# pyRCV - Preferential voting counting # pyRCV - Preferential voting counting
# Copyright © 2016–2017 RunasSudo (Yingtong Li) # Copyright © 2016-2021 RunasSudo (Yingtong Li)
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by # it under the terms of the GNU Affero General Public License as published by
@ -41,10 +41,10 @@ def writeBLT(election, q_num, seats, withdrawn=[]):
for candidate in flat_choices: for candidate in flat_choices:
if candidate.party: if candidate.party:
electionLines.append("'{}{}'".format(candidate.name, candidate.party)) electionLines.append('"{}{}"'.format(candidate.name, candidate.party))
else: else:
electionLines.append("'{}'".format(candidate.name)) electionLines.append('"{}"'.format(candidate.name))
electionLines.append("'{}{}'".format(election.name, question.prompt)) electionLines.append('"{}{}"'.format(election.name, question.prompt))
return electionLines return electionLines