unicode is named str now => fix type check.

This commit is contained in:
Walter Dörwald 2007-06-12 18:07:38 +00:00
parent 2c849f2f20
commit 2d5c219fe0
1 changed files with 1 additions and 1 deletions

View File

@ -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