diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2011-02-03 21:10:45 +0100 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2011-02-03 21:10:45 +0100 |
commit | 4af398f3c010e244ba7014dee3375b0e2a612930 (patch) | |
tree | da13f19e765e50481c4f0bec5b7f8ab7e64d5db9 | |
parent | 4c171bf0e82c15437317cebda4008aacd944c36e (diff) |
Use 'replace' for errors in str.encode().
-rwxr-xr-x | gitnoti.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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 |