unicode is named str now => fix type check.
This commit is contained in:
parent
2c849f2f20
commit
2d5c219fe0
|
@ -978,7 +978,7 @@ class TarInfo(object):
|
|||
info["name"] += "/"
|
||||
|
||||
for key in ("name", "linkname", "uname", "gname"):
|
||||
if type(info[key]) is unicode:
|
||||
if isinstance(info[key], str):
|
||||
info[key] = info[key].encode(encoding, errors)
|
||||
|
||||
return info
|
||||
|
|
Loading…
Reference in New Issue