Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2d5c219

Browse files
committed
unicode is named str now => fix type check.
1 parent 2c849f2 commit 2d5c219

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/tarfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,7 @@ def get_info(self, encoding, errors):
978978
info["name"] += "/"
979979

980980
for key in ("name", "linkname", "uname", "gname"):
981-
if type(info[key]) is unicode:
981+
if isinstance(info[key], str):
982982
info[key] = info[key].encode(encoding, errors)
983983

984984
return info

0 commit comments

Comments
 (0)