Parcourir la source

fix again another utf-8 issue in reminder.py

Julien Rabier il y a 12 ans
Parent
commit
473c73474d
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 3 3
      reminder.py

+ 3 - 3
reminder.py

@@ -32,7 +32,7 @@ for vote in c.execute('select id, id_group, date_end, title from votes where is_
         for user in c.execute('select users.id, users.email, users.name from users join user_group on users.id=user_group.id_user where user_group.id_group = ?', voting_group).fetchall():
         for user in c.execute('select users.id, users.email, users.name from users join user_group on users.id=user_group.id_user where user_group.id_group = ?', voting_group).fetchall():
             userchoice_request = (user[0], vote[0],)
             userchoice_request = (user[0], vote[0],)
             userchoice = c.execute('select * from user_choice join choices on user_choice.id_choice = choices.id where id_user = ? and id_vote = ?', userchoice_request).fetchone()
             userchoice = c.execute('select * from user_choice join choices on user_choice.id_choice = choices.id where id_user = ? and id_vote = ?', userchoice_request).fetchone()
-            print "Checking if user %s already voted %s" % (user[1], vote[3].encode('utf-8'))
+            print "Checking if user %s already voted %s" % (user[1].encode('utf-8'), vote[3].encode('utf-8'))
             print userchoice
             print userchoice
             if userchoice is None:
             if userchoice is None:
                 #user didn't vote yet
                 #user didn't vote yet
@@ -45,7 +45,7 @@ for vote in c.execute('select id, id_group, date_end, title from votes where is_
                     "Content-type: text/plain; charset=utf-8",
                     "Content-type: text/plain; charset=utf-8",
                     "X-Mailer: %s" % VERSION,
                     "X-Mailer: %s" % VERSION,
                     "",
                     "",
-                    "%s %s : %s" % (gettext(u"A vote concerns you and is going to terminate on"), vote[2], vote[3].encode('utf-8')),
+                    "%s %s : %s" % (gettext(u"A vote concerns you and is going to terminate on"), vote[2].encode('utf-8'), vote[3].encode('utf-8')),
                     gettext(u"You still didn't take part to it !"),
                     gettext(u"You still didn't take part to it !"),
                     "",
                     "",
                     gettext(u"This link will bring you to the form where you will be able to participate :"),
                     gettext(u"This link will bring you to the form where you will be able to participate :"),
@@ -68,7 +68,7 @@ for vote in c.execute('select id, id_group, date_end, title from votes where is_
                     "Content-type: text/plain; charset=utf-8",
                     "Content-type: text/plain; charset=utf-8",
                     "X-Mailer: %s" % VERSION,
                     "X-Mailer: %s" % VERSION,
                     "",
                     "",
-                    "%s %s : %s" % (gettext(u"A vote concerns you and is going to terminate on "), vote[2], vote[3].encode('utf-8')),
+                    "%s %s : %s" % (gettext(u"A vote concerns you and is going to terminate on "), vote[2].encode('utf-8'), vote[3].encode('utf-8')),
                     gettext(u"You have already voted but you can still modify your choice"),
                     gettext(u"You have already voted but you can still modify your choice"),
                     "",
                     "",
                     gettext(u"This link will bring you to the form where you will be able to participate :"),
                     gettext(u"This link will bring you to the form where you will be able to participate :"),