Bug #1603321: make pstats.Stats accept Unicode file paths.

(backport from rev. 52845)
This commit is contained in:
Georg Brandl 2006-11-26 19:27:51 +00:00
parent 9147f7ed8b
commit 2286441a81
1 changed files with 1 additions and 1 deletions

View File

@ -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()