[yum-cvs] yum-utils repo-rss.py,1.7,1.8

Tim Lauridsen timlau at linux.duke.edu
Tue Feb 20 11:15:37 UTC 2007


Update of /home/groups/yum/cvs/yum-utils
In directory login1.linux.duke.edu:/tmp/cvs-serv19967

Modified Files:
	repo-rss.py 
Log Message:
fixed UnicodeEncodeError: 'ascii' codec can't encode character errors.

Index: repo-rss.py
===================================================================
RCS file: /home/groups/yum/cvs/yum-utils/repo-rss.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- repo-rss.py	19 Feb 2007 12:32:18 -0000	1.7
+++ repo-rss.py	20 Feb 2007 11:15:35 -0000	1.8
@@ -145,8 +145,8 @@
             changelog += '%s - %s\n%s\n\n' % (date, author, desc)
         description = '<p><strong>%s</strong> - %s</p>\n\n' % (escape(pkg.name), 
                                             escape(pkg.returnSimple('summary')))
-        description += '<p>%s</p>\n\n<p><strong>Change Log:</strong></p>\n\n' % escape(pkg.returnSimple('description').replace("\n", "<br />\n"))
-        description += escape('<pre>%s</pre>' % escape(changelog))
+        description += '<p>%s</p>\n\n<p><strong>Change Log:</strong></p>\n\n' % escape(pkg.returnSimple('description').encode('utf-8').replace("\n", "<br />\n"))
+        description += escape('<pre>%s</pre>' % escape(changelog.encode('utf-8')))
         item.newChild(None, 'description', description)
         
         return item




More information about the Yum-cvs-commits mailing list