From: Walter Dörwald Date: Tue, 12 Jun 2007 18:07:38 +0000 (+0000) Subject: unicode is named str now => fix type check. X-Git-Tag: v3.0a1~774 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2d5c219fe09eacf81c139e5af9114fbbdd093d85;p=python unicode is named str now => fix type check. --- diff --git a/Lib/tarfile.py b/Lib/tarfile.py index ef6f1c79e9..97973fde50 100644 --- a/Lib/tarfile.py +++ b/Lib/tarfile.py @@ -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