From ab1837d824ae1adc5eb32b928200ac673da218e7 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Fri, 26 Nov 2010 13:05:32 +0100 Subject: Attempted to fix unicode weirdness. --- gitnoti.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gitnoti.py b/gitnoti.py index 9c9cbd8..528f42b 100755 --- a/gitnoti.py +++ b/gitnoti.py @@ -85,9 +85,9 @@ def repo_commit_msg(repo, branch, commits): reponame, ('/'+branch) if branch else '', commit.hexsha[:7], - commit.committer.name if commit.author.name == commit.committer.name else '%s/%s' % (commit.committer.name, commit.author.name), + commit.committer.name if commit.author.name.encode('utf8') == commit.committer.name else '%s/%s' % (commit.committer.name, commit.author.name.encode('utf8')), stat, - commit.summary + commit.summary.encode('utf8') ) if options.url: @@ -103,10 +103,10 @@ def repo_commit_msg(repo, branch, commits): short_url = None if short_url: - url = short_url + url = short_url.encode('utf-8') msg += url - return msg.encode('utf-8') + return msg class ReposNotifyEvent(pyinotify.ProcessEvent): def new_repo(self, event): -- cgit v1.2.3