fedora-vote vote.cgi,1.15,1.16 votingadmin.py,1.9,1.10

Ricky Zhou (周家杰) (ricky) fedora-extras-commits at redhat.com
Mon Apr 21 05:45:41 UTC 2008


Author: ricky

Update of /cvs/fedora/fedora-vote
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25304

Modified Files:
	vote.cgi votingadmin.py 
Log Message:
Fix some UnicodeEncodeErrors



Index: vote.cgi
===================================================================
RCS file: /cvs/fedora/fedora-vote/vote.cgi,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- vote.cgi	21 Apr 2008 04:30:05 -0000	1.15
+++ vote.cgi	21 Apr 2008 05:45:33 -0000	1.16
@@ -154,5 +154,5 @@
         pageTitle = 'Fedora Voting App -- Error Page'
 
     website.print_header(pageTitle)
-    print content
+    print content.encode('utf-8')
     website.print_footer(pageTitle)


Index: votingadmin.py
===================================================================
RCS file: /cvs/fedora/fedora-vote/votingadmin.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- votingadmin.py	21 Apr 2008 02:07:28 -0000	1.9
+++ votingadmin.py	21 Apr 2008 05:45:33 -0000	1.10
@@ -44,7 +44,7 @@
                 raise VotingError, 'Unknown candidate'
             # Check that candidateName and id match, otherwise the html ballot
             # is coded with mismatching names to candidate ids.
-            if candidates[int(ballotCandidate)][0] != ballot[ballotCandidate]:
+            if candidates[int(ballotCandidate)][0].encode('utf-8') != ballot[ballotCandidate]:
                 raise VotingError, 'Candidate ID does not match Candidate Name'
             if tally.has_key(ballotCandidate):
                 raise VotingError, 'Candidate ID entered more than once'




More information about the fedora-extras-commits mailing list