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: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=21d900f1d68fe4668388634408e84a5e610baa16;p=thirdparty%2FPython%2Fcpython.git Bug #1603321: make pstats.Stats accept Unicode file paths. --- diff --git a/Lib/pstats.py b/Lib/pstats.py index 4e94b0ce0ee3..bdbb27e048d2 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()