summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-11-26 13:05:32 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2010-11-26 13:05:32 +0100
commitab1837d824ae1adc5eb32b928200ac673da218e7 (patch)
tree38a93b9989b4a1a5051385e55974ff1b0d7a43ee
parent7c87fa6c77279b91e272219a52e4f50780a7186f (diff)
Attempted to fix unicode weirdness.
-rwxr-xr-xgitnoti.py8
1 files 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):