mirror of
https://github.com/python/cpython.git
synced 2025-11-20 02:50:14 +00:00
unicode is named str now => fix type check.
This commit is contained in:
parent
2c849f2f20
commit
2d5c219fe0
1 changed files with 1 additions and 1 deletions
|
|
@ -978,7 +978,7 @@ class TarInfo(object):
|
||||||
info["name"] += "/"
|
info["name"] += "/"
|
||||||
|
|
||||||
for key in ("name", "linkname", "uname", "gname"):
|
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)
|
info[key] = info[key].encode(encoding, errors)
|
||||||
|
|
||||||
return info
|
return info
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue