Merge pull request #11 from markrawlingson/master

encoding message body to utf-8 - chars such as é cause an exception
pull/13/head
David "Naypam" Trail 10 years ago
commit 56894b562b

@ -118,7 +118,7 @@ for thing in things:
if verbose: if verbose:
msg = '/r/{3}/ #{0} with:\n\t"{1}" to\n\t"{2}"'.format( msg = '/r/{3}/ #{0} with:\n\t"{1}" to\n\t"{2}"'.format(
thing.id, thing.id,
sub(r'\n\r\t', ' ', thing.body[:78]), sub(r'\n\r\t', ' ', thing.body[:78].encode('utf-8')),
replacement_text[:78], replacement_text[:78],
thing.subreddit thing.subreddit
) )

Loading…
Cancel
Save