changeset 13:87f0a5309af2 default tip

Se corrige la lista de sedes en la cuenta de votos
author Germán Póo-Caamaño <gpoo@calcifer.org>
date Fri, 17 Jul 2009 01:09:59 -0400
parents 8cb7af0b6552
children
files vote-counter.py
diffstat 1 files changed, 12 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/vote-counter.py	Fri Sep 21 21:16:14 2007 -0400
+++ b/vote-counter.py	Fri Jul 17 01:09:59 2009 -0400
@@ -10,8 +10,8 @@
 MAX_CANDIDATES = 1
 
 candidate_tuples = [ \
-    ("UNIVERSIDAD TECNICA FEDERICO SANTA MARIA", 1), \
-    ("UNIVERSIDAD DE CONCEPCION", 2) ]
+    ("UNIVERSIDAD DEL BIO-BIO", 1), \
+    ("INSTITUTO PROFESIONAL DUOC", 2) ]
 
 class Ballot:
     def __init__ (self):
@@ -94,13 +94,13 @@
             if (current_ballot.member_name):
                 print "Duplicate member name in ballot from '%s' - " \
                       "duplicates ''%s', '%s'" \
-                      % (current_ballot.email, current_ballot.member_name, 
+                      % (current_ballot.email, current_ballot.member_name,
                          member)
-            else:        
+            else:
                 current_ballot.member_name = member
 
             continue
-                
+
         match = member_address_re.match(line)
         if match:
             member = string.strip(match.group(1))
@@ -108,11 +108,11 @@
                 print "Duplicate member address in ballot from '%s' - " \
                       "duplicates ''%s', '%s'" \
                       % (current_ballot.email, current_ballot.member, member)
-            else:        
+            else:
                 current_ballot.member = member
 
             continue
-                
+
         match = auth_token_re.match(line)
         if match:
             token = string.strip(match.group(1))
@@ -136,14 +136,14 @@
                       % (name, id, current_ballot.email)
             elif not candidates[id].name == name:
                 print "Candidate name '%s' for ID '%s' doesn't match, " \
-                      "expected '%s'" % (name, id, candidates[id].name)    
+                      "expected '%s'" % (name, id, candidates[id].name)
             else:
                 current_ballot.add_vote(name, id)
             continue
-        
+
     if current_ballot:
-        ballots.append(current_ballot)    
-        
+        ballots.append(current_ballot)
+
     fp.close ()
 
     return ballots
@@ -207,7 +207,7 @@
         if error:
             print "Ignoring ballot %d from '%s' due to: %s" \
                   % (i, b.email, error)
-            
+
         i = i + 1
 
     return valid_ballots