From: Georg Brandl Date: Sun, 26 Nov 2006 19:27:51 +0000 (+0000) Subject: Bug #1603321: make pstats.Stats accept Unicode file paths. X-Git-Tag: v2.5.1c1~234 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2286441a815b3dc2d9f5fa4e71c3d38875e9b463;p=thirdparty%2FPython%2Fcpython.git Bug #1603321: make pstats.Stats accept Unicode file paths. (backport from rev. 52845) --- 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()