fedora-vote castvote.cgi, 1.1.1.1, 1.2 voting.py, 1.1.1.1, 1.2 votingadmin.py, 1.1.1.1, 1.2

Toshio Ernie Kuratomi (toshio) fedora-extras-commits at redhat.com
Sat Jun 10 02:57:54 UTC 2006


Author: toshio

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

Modified Files:
	castvote.cgi voting.py votingadmin.py 
Log Message:
* castvote.cgi, votingadmin.py: Fix some syntax errors involving paranthesis.
* voting.py: Change pseudo code into actual python.



Index: castvote.cgi
===================================================================
RCS file: /cvs/fedora/fedora-vote/castvote.cgi,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- castvote.cgi	9 Jun 2006 06:17:30 -0000	1.1.1.1
+++ castvote.cgi	10 Jun 2006 02:57:52 -0000	1.2
@@ -67,7 +67,7 @@
                     'Voting Error',
                     '''The Fedora Voting Application failed to save a ballot
 cast by %s in the %s election.  It received a VotingError with message %s in
-catvote.cgi.''' % (username, electionName, str(e))
+catvote.cgi.''' % (username, electionName, str(e)))
             content = '<p class="error">The ballot you have attempted to' \
                     ' cast is not valid.  The admins have been emailed to' \
                     ' see why the website is trying to send malformed' \
@@ -77,7 +77,7 @@
                 'Database Error',
                 '''The Fedora Voting Application was unable to save a ballot
 cast by %s in the %s election.  It received a DatabaseError with the message
-%s in castvote.cgi.''' %(usename, electionName, str(e))
+%s in castvote.cgi.''' %(usename, electionName, str(e)))
             content = '<p class="error">There was a database error while' \
                     ' processing your ballot.  The ballot was not saved.' \
                     ' The voting admins have been emailed to look into the' \


Index: voting.py
===================================================================
RCS file: /cvs/fedora/fedora-vote/voting.py,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- voting.py	9 Jun 2006 06:17:30 -0000	1.1.1.1
+++ voting.py	10 Jun 2006 02:57:52 -0000	1.2
@@ -135,7 +135,7 @@
             self.dbCmd.execute("select max_seats from election"
                             " where id = '%s'" % self.electionId)
             seats = self.dbCmd.fetchall()
-            if len(seats) not 1:
+            if len(seats) != 1:
                 raise VotingError, 'Each election id should return a single' \
                         'row from the database. %s did not' % self.electionId
             self.seats = seats[0][0]


Index: votingadmin.py
===================================================================
RCS file: /cvs/fedora/fedora-vote/votingadmin.py,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- votingadmin.py	9 Jun 2006 06:17:30 -0000	1.1.1.1
+++ votingadmin.py	10 Jun 2006 02:57:52 -0000	1.2
@@ -46,7 +46,7 @@
             if tally.has_key(ballotCandidate):
                 raise VotingError, 'Candidate ID entered more than once'
             tally[ballotCandidate] = 1
-            receiptList.append('<li>' + ballot[ballotCandidate]) + '</li>')
+            receiptList.append('<li>' + ballot[ballotCandidate] + '</li>')
         receiptList.append('</ul>')
         
         # See if the user has already submitted a ballot




More information about the fedora-extras-commits mailing list