Author: humbedooh
Date: Wed Mar 25 00:59:48 2015
New Revision: 1669032

URL: http://svn.apache.org/r1669032
Log:
for STV(N)/DH(N), let's put N inside constants.py instead and have plugins use 
that

Modified:
    steve/trunk/pysteve/lib/constants.py
    steve/trunk/pysteve/lib/plugins/dh.py
    steve/trunk/pysteve/lib/plugins/stv.py

Modified: steve/trunk/pysteve/lib/constants.py
URL: 
http://svn.apache.org/viewvc/steve/trunk/pysteve/lib/constants.py?rev=1669032&r1=1669031&r2=1669032&view=diff
==============================================================================
--- steve/trunk/pysteve/lib/constants.py (original)
+++ steve/trunk/pysteve/lib/constants.py Wed Mar 25 00:59:48 2015
@@ -19,3 +19,6 @@ VOTE_TYPES = (
     
 )
 
+# For vote types with N number of seats/spots, this value denotes
+# the max number of useable types to display via the API
+MAX_NUM = 20
\ No newline at end of file

Modified: steve/trunk/pysteve/lib/plugins/dh.py
URL: 
http://svn.apache.org/viewvc/steve/trunk/pysteve/lib/plugins/dh.py?rev=1669032&r1=1669031&r2=1669032&view=diff
==============================================================================
--- steve/trunk/pysteve/lib/plugins/dh.py (original)
+++ steve/trunk/pysteve/lib/plugins/dh.py Wed Mar 25 00:59:48 2015
@@ -94,7 +94,7 @@ constants.VOTE_TYPES += (
 )
 
 # Add ad nauseam
-for i in range(2,21):
+for i in range(2,constants.MAX_NUM+1):
     constants.VOTE_TYPES += (
         {
             'key': "dh%u" % i,

Modified: steve/trunk/pysteve/lib/plugins/stv.py
URL: 
http://svn.apache.org/viewvc/steve/trunk/pysteve/lib/plugins/stv.py?rev=1669032&r1=1669031&r2=1669032&view=diff
==============================================================================
--- steve/trunk/pysteve/lib/plugins/stv.py (original)
+++ steve/trunk/pysteve/lib/plugins/stv.py Wed Mar 25 00:59:48 2015
@@ -179,7 +179,7 @@ constants.VOTE_TYPES += (
 )
 
 # Add ad nauseam
-for i in range(2,21):
+for i in range(2,constants.MAX_NUM+1):
     constants.VOTE_TYPES += (
         {
             'key': "stv%02u" % i,


Reply via email to