Mercurial > kallithea
changeset 4499:bbf4118f6e0f
git: fix "'name' must be bytestring, not unicode" error on browsing changesets
Adding some extra safe_str to address
https://bitbucket.org/conservancy/kallithea/issue/24/clicking-on-changesets-results-in-a-500
seems consistent with existing code.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Sun, 31 Aug 2014 14:44:54 +0200 |
parents | 3b082ec6fd8b |
children | e69d34136be5 |
files | kallithea/lib/vcs/backends/git/changeset.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/vcs/backends/git/changeset.py Sat Aug 30 15:19:52 2014 +0200 +++ b/kallithea/lib/vcs/backends/git/changeset.py Sun Aug 31 14:44:54 2014 +0200 @@ -27,11 +27,11 @@ def __init__(self, repository, revision): self._stat_modes = {} self.repository = repository - + revision = safe_str(revision) try: - commit = self.repository._repo[str(revision)] + commit = self.repository._repo[revision] if isinstance(commit, objects.Tag): - revision = commit.object[1] + revision = safe_str(commit.object[1]) commit = self.repository._repo.get_object(commit.object[1]) except KeyError: raise RepositoryError("Cannot get object with id %s" % revision)