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

This commit is contained in:
Georg Brandl 2006-11-26 19:27:47 +00:00
parent 4d542ec13c
commit 21d900f1d6
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()