From 21d900f1d68fe4668388634408e84a5e610baa16 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 26 Nov 2006 19:27:47 +0000 Subject: [PATCH] Bug #1603321: make pstats.Stats accept Unicode file paths. --- Lib/pstats.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/pstats.py b/Lib/pstats.py index 4e94b0ce0ee..bdbb27e048d 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()