Author: humbedooh
Date: Sun Mar 22 22:25:01 2015
New Revision: 1668496

URL: http://svn.apache.org/r1668496
Log:
index out of range, pfeh

Modified:
    steve/trunk/pysteve/www/cgi-bin/lib/election.py

Modified: steve/trunk/pysteve/www/cgi-bin/lib/election.py
URL: 
http://svn.apache.org/viewvc/steve/trunk/pysteve/www/cgi-bin/lib/election.py?rev=1668496&r1=1668495&r2=1668496&view=diff
==============================================================================
--- steve/trunk/pysteve/www/cgi-bin/lib/election.py (original)
+++ steve/trunk/pysteve/www/cgi-bin/lib/election.py Sun Mar 22 22:25:01 2015
@@ -118,7 +118,7 @@ def getproportion(votes, winners, step,
         if xstep >= step:
             tvotes += 1
         # We found it? Good, let's add that to the tally
-        if not vote[xstep] in winners:
+        if xstep < len(vote) and not vote[xstep] in winners:
             char = vote[xstep]
             prop[char] = (prop[char] if char in prop else 0) + 1
             


Reply via email to