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:45:59 UTC

svn commit: r1729156 - /steve/trunk/pysteve/lib/plugins/stv.py

Author: humbedooh
Date: Mon Feb  8 12:45:59 2016
New Revision: 1729156

URL: http://svn.apache.org/viewvc?rev=1729156&view=rev
Log:
hash not list

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=1729156&r1=1729155&r2=1729156&view=diff
==============================================================================
--- steve/trunk/pysteve/lib/plugins/stv.py (original)
+++ steve/trunk/pysteve/lib/plugins/stv.py Mon Feb  8 12:45:59 2016
@@ -327,11 +327,11 @@ def generate_random(count, votes):
 
 
 def tallySTV(votes, issue):
-    rvotes = []
+    rvotes = {}
     # Cut out abstained votes.
     for vote in votes:
-        if vote.find("-") == -1:
-            rvotes.append(vote)
+        if votes[vote].find("-") == -1:
+            rvotes[vote] = votes[vote]
     votes = rvotes
     m = re.match(r"stv(\d+)", issue['type'])
     if not m: