Rev 85: 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
Tue Mar 8 12:18:43 UTC 2011
At http://bazaar.launchpad.net/~jameinel/other/hydrazine
------------------------------------------------------------
revno: 85 [merge]
revision-id: john at arbash-meinel.com-20110308121831-g6x15iczqhv6swoj
parent: maxb at f2s.com-20101202004440-sgsbwucq3x4p9v57
parent: john at arbash-meinel.com-20101001210507-ba9b084se934vuec
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: hydrazine
timestamp: Tue 2011-03-08 13:18:31 +0100
message:
Work around bug #612641 by encoding to ascii if necessary.
modified:
feed-pqm feedpqm-20100302042056-su6dg82u4u0551bv-1
-------------- 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