Bug #1603321: make pstats.Stats accept Unicode file paths.
This commit is contained in:
parent
4d542ec13c
commit
21d900f1d6
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue