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 2015/04/02 15:19:16 UTC

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

Author: humbedooh
Date: Thu Apr  2 13:19:15 2015
New Revision: 1670902

URL: http://svn.apache.org/r1670902
Log:
try_remove_lowest: which isn't always found, borks steve if so

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=1670902&r1=1670901&r2=1670902&view=diff
==============================================================================
--- steve/trunk/pysteve/lib/plugins/stv.py (original)
+++ steve/trunk/pysteve/lib/plugins/stv.py Thu Apr  2 13:19:15 2015
@@ -265,6 +265,9 @@ def try_remove_lowest(surplus, candidate
     if c.status == HOPEFUL and c.vote < lowest1:
       lowest1 = c.vote
       which = c
+  if not which:
+    debug.append("Could not find a subject to eliminate")
+    return False
   for c in candidates.l:
     if c != which and c.status != ELIMINATED and c.vote < lowest2:
       lowest2 = c.vote