Rev 78: Work around bug #612641 by encoding to ascii if necessary. in http://bazaar.launchpad.net/~jameinel/other/hydrazine
John Arbash Meinel
john at arbash-meinel.com
Fri Oct 1 22:05:22 BST 2010
At http://bazaar.launchpad.net/~jameinel/other/hydrazine
------------------------------------------------------------
revno: 78
revision-id: john at arbash-meinel.com-20101001210507-ba9b084se934vuec
parent: maxb at f2s.com-20100903015755-s3nxga5eidwryhx1
fixes bug(s): https://launchpad.net/bugs/612641
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: hydrazine
timestamp: Fri 2010-10-01 16:05:07 -0500
message:
Work around bug #612641 by encoding to ascii if necessary.
-------------- next part --------------
=== modified file 'feed-pqm'
--- a/feed-pqm 2010-06-28 19:13:18 +0000
+++ b/feed-pqm 2010-10-01 21:05:07 +0000
@@ -102,7 +102,12 @@
print "Recent comments:"
comments = list(mp.all_comments) #XXX: See bug lp:583761
for comment in comments[-1:]:
- print "%s: %s" % (comment.author.name, comment.message_body)
+ val = "%s: %s" % (comment.author.name, comment.message_body)
+ try:
+ print val
+ except UnicodeError:
+ val = val.encode('ascii', 'replace')
+ print val
def set_message(mp):
More information about the bazaar-commits
mailing list