From 55fd173c898da2930a331db7755a7338920d3c38 Mon Sep 17 00:00:00 2001 From: Harmon Date: Fri, 7 Feb 2020 06:23:53 -0600 Subject: Remove and replace compat.text_type --- git/objects/fun.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'git/objects/fun.py') diff --git a/git/objects/fun.py b/git/objects/fun.py index 1b6cefa2..9b36712e 100644 --- a/git/objects/fun.py +++ b/git/objects/fun.py @@ -2,8 +2,7 @@ from stat import S_ISDIR from git.compat import ( safe_decode, - defenc, - text_type + defenc ) __all__ = ('tree_to_stream', 'tree_entries_from_data', 'traverse_trees_recursive', @@ -33,7 +32,7 @@ def tree_to_stream(entries, write): # hence we must convert to an utf8 string for it to work properly. # According to my tests, this is exactly what git does, that is it just # takes the input literally, which appears to be utf8 on linux. - if isinstance(name, text_type): + if isinstance(name, str): name = name.encode(defenc) write(b''.join((mode_str, b' ', name, b'\0', binsha))) # END for each item -- cgit v1.2.1