This is my 'trivial' fix for it:
=== modified file 'feed-pqm' --- feed-pqm 2010-06-28 19:13:18 +0000 +++ feed-pqm 2010-10-01 20:59:46 +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):
This is my 'trivial' fix for it:
=== modified file 'feed-pqm' all_comments) #XXX: See bug lp:583761 author. name, comment. message_ body) author. name, comment. message_ body)
--- feed-pqm 2010-06-28 19:13:18 +0000
+++ feed-pqm 2010-10-01 20:59:46 +0000
@@ -102,7 +102,12 @@
print "Recent comments:"
comments = list(mp.
for comment in comments[-1:]:
- print "%s: %s" % (comment.
+ val = "%s: %s" % (comment.
+ try:
+ print val
+ except UnicodeError:
+ val = val.encode('ascii', 'replace')
+ print val
def set_message(mp):