From: Georg Brandl Date: Sun, 26 Nov 2006 19:27:47 +0000 (+0000) Subject: Bug #1603321: make pstats.Stats accept Unicode file paths. X-Git-Tag: v2.6a1~2402 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=21d900f1d68fe4668388634408e84a5e610baa16;p=python Bug #1603321: make pstats.Stats accept Unicode file paths. --- diff --git a/Lib/pstats.py b/Lib/pstats.py index 4e94b0ce0e..bdbb27e048 100644 --- a/Lib/pstats.py +++ b/Lib/pstats.py @@ -116,7 +116,7 @@ class Stats: def load_stats(self, arg): if not arg: self.stats = {} - elif type(arg) == type(""): + elif isinstance(arg, basestring): f = open(arg, 'rb') self.stats = marshal.load(f) f.close()