You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@steve.apache.org by hu...@apache.org on 2016/02/08 13:42:20 UTC
svn commit: r1729154 - /steve/trunk/pysteve/lib/plugins/stv.py
Author: humbedooh
Date: Mon Feb 8 12:42:20 2016
New Revision: 1729154
URL: http://svn.apache.org/viewvc?rev=1729154&view=rev
Log:
oops
Modified:
steve/trunk/pysteve/lib/plugins/stv.py
Modified: steve/trunk/pysteve/lib/plugins/stv.py
URL: http://svn.apache.org/viewvc/steve/trunk/pysteve/lib/plugins/stv.py?rev=1729154&r1=1729153&r2=1729154&view=diff
==============================================================================
--- steve/trunk/pysteve/lib/plugins/stv.py (original)
+++ steve/trunk/pysteve/lib/plugins/stv.py Mon Feb 8 12:42:20 2016
@@ -33,7 +33,7 @@ debug = []
def validateSTV(vote, issue):
"Tries to validate a vote, returns why if not valid, None otherwise"
letters = [chr(i) for i in range(ord('a'), ord('a') + len(issue['candidates']))]
- letters.push('-')
+ letters.append('-')
for char in letters:
if vote.count(char) > 1:
return "Duplicate letters found"
@@ -331,7 +331,7 @@ def tallySTV(votes, issue):
# Cut out abstained votes.
for vote in votes:
if vote.find("-") == -1:
- rvotes.push(vote)
+ rvotes.append(vote)
votes = rvotes
m = re.match(r"stv(\d+)", issue['type'])
if not m: