Changeset - bbf4118f6e0f
[Not reviewed]
default
0 1 0
Mads Kiilerich (kiilerix) - 11 years ago 2014-08-31 12:44:54
mads@kiilerich.com
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.
1 file changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general) First comment
kallithea/lib/vcs/backends/git/changeset.py
Show inline comments
 
@@ -27,11 +27,11 @@ class GitChangeset(BaseChangeset):
 
    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)
0 comments (0 inline, 0 general) First comment
You need to be logged in to comment. Login now