damned-lies r997 - trunk



Author: claudep
Date: Wed Sep 17 18:13:26 2008
New Revision: 997
URL: http://svn.gnome.org/viewvc/damned-lies?rev=997&view=rev

Log:
2008-09-17  Claude Paroz  <claude 2xlibre net>

	* update-stats.py: Make notify_list() handle utf-8 in diff argument.

Modified:
   trunk/ChangeLog
   trunk/update-stats.py

Modified: trunk/update-stats.py
==============================================================================
--- trunk/update-stats.py	(original)
+++ trunk/update-stats.py	Wed Sep 17 18:13:26 2008
@@ -152,7 +152,7 @@
         using SMTP on localhost:25."""
         import smtplib
         from email.mime.text import MIMEText
-        text = """This is an automatic notification from status generation scripts on:
+        text = u"""This is an automatic notification from status generation scripts on:
     %(ourweb)s.
 
 There have been following string additions to module '%(module)s':
@@ -163,9 +163,9 @@
 might be worth investigating.
 """ % { 'module' : out_domain,
         'ourweb' : defaults.WHEREAREWE,
-        'potdiff' : "\n    ".join(diff) }
+        'potdiff' : "\n    ".join(diff).decode('utf-8') }
 
-        msg = MIMEText(text)
+        msg = MIMEText(text.encode('utf-8'), 'plain', 'utf-8')
         msg['Subject'] = "String additions to '%s'" % (out_domain)
         msg['From'] = "GNOME Status Pages <%s>" % (defaults.WHOAREWE)
         msg['To'] = defaults.notifications_to



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]