mirror of
https://github.com/python/cpython.git
synced 2026-01-28 18:22:17 +00:00
Bug #1603321: make pstats.Stats accept Unicode file paths.
(backport from rev. 52845)
This commit is contained in:
parent
9147f7ed8b
commit
2286441a81
1 changed files with 1 additions and 1 deletions
|
|
@ -116,7 +116,7 @@ def init(self, arg):
|
|||
|
||||
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…
Add table
Add a link
Reference in a new issue