mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +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"] += "/"
|
||||
|
||||
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…
Add table
Add a link
Reference in a new issue