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/25 14:55:32 UTC

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

Author: humbedooh
Date: Thu Feb 25 13:55:32 2016
New Revision: 1732306

URL: http://svn.apache.org/viewvc?rev=1732306&view=rev
Log:
split on whitespace and comma

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=1732306&r1=1732305&r2=1732306&view=diff
==============================================================================
--- steve/trunk/pysteve/lib/plugins/stv.py (original)
+++ steve/trunk/pysteve/lib/plugins/stv.py Thu Feb 25 13:55:32 2016
@@ -342,7 +342,7 @@ def tallySTV(votes, issue):
     # Cut out abstained votes.
     for vote in votes:
         if votes[vote].find("-") == -1:
-            rvotes[vote] = votes[vote].split(" ")
+            rvotes[vote] = re.split(r"[\s,]", votes[vote])
     votes = rvotes
     m = re.match(r"stv(\d+)", issue['type'])
     if not m: