diff options
-rw-r--r-- | git/objects/base.py | 2 | ||||
-rw-r--r-- | git/test/test_base.py | 2 | ||||
-rw-r--r-- | git/test/test_submodule.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/git/objects/base.py b/git/objects/base.py index 004e3981..3f595d9d 100644 --- a/git/objects/base.py +++ b/git/objects/base.py @@ -60,7 +60,7 @@ class Object(LazyMixin): :param sha1: 20 byte binary sha1""" if sha1 == cls.NULL_BIN_SHA: # the NULL binsha is always the root commit - return get_object_type_by_name('commit')(repo, sha1) + return get_object_type_by_name(b'commit')(repo, sha1) # END handle special case oinfo = repo.odb.info(sha1) inst = get_object_type_by_name(oinfo.type)(repo, oinfo.binsha) diff --git a/git/test/test_base.py b/git/test/test_base.py index edacbd80..9ae2dd2b 100644 --- a/git/test/test_base.py +++ b/git/test/test_base.py @@ -86,7 +86,7 @@ class TestBase(TestBase): assert base.Object in get_object_type_by_name(tname).mro() # END for each known type - assert_raises(ValueError, get_object_type_by_name, "doesntexist") + assert_raises(ValueError, get_object_type_by_name, b"doesntexist") def test_object_resolution(self): # objects must be resolved to shas so they compare equal diff --git a/git/test/test_submodule.py b/git/test/test_submodule.py index 499d6bac..99996ce3 100644 --- a/git/test/test_submodule.py +++ b/git/test/test_submodule.py @@ -80,7 +80,7 @@ class TestSubmodule(TestBase): assert isinstance(sm.branch_path, string_types) # some commits earlier we still have a submodule, but its at a different commit - smold = Submodule.iter_items(rwrepo, self.k_subm_changed).next() + smold = next(Submodule.iter_items(rwrepo, self.k_subm_changed)) assert smold.binsha != sm.binsha assert smold != sm # the name changed |