summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgitnoti.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gitnoti.py b/gitnoti.py
index 5d5f186..db39ce1 100755
--- a/gitnoti.py
+++ b/gitnoti.py
@@ -88,9 +88,9 @@ def repo_commit_msg(repo, branch, commits):
reponame,
('/'+branch) if branch else '',
commit.hexsha[:7],
- commit.committer.name if commit.author.name.encode('utf8') == commit.committer.name else '%s/%s' % (commit.committer.name, commit.author.name.encode('utf8')),
+ commit.committer.name if commit.author.name.encode('utf8', 'replace') == commit.committer.name else '%s/%s' % (commit.committer.name, commit.author.name.encode('utf8', 'replace')),
stat,
- commit.summary.encode('utf8')
+ commit.summary.encode('utf8', 'replace')
)
if options.url:
@@ -106,7 +106,7 @@ def repo_commit_msg(repo, branch, commits):
short_url = None
if short_url:
- url = short_url.encode('utf-8')
+ url = short_url.encode('utf-8', 'replace')
msg += url
return msg