Kaydet (Commit) 21d900f1 authored tarafından Georg Brandl's avatar Georg Brandl

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

üst 4d542ec1
...@@ -116,7 +116,7 @@ class Stats: ...@@ -116,7 +116,7 @@ class Stats:
def load_stats(self, arg): def load_stats(self, arg):
if not arg: self.stats = {} if not arg: self.stats = {}
elif type(arg) == type(""): elif isinstance(arg, basestring):
f = open(arg, 'rb') f = open(arg, 'rb')
self.stats = marshal.load(f) self.stats = marshal.load(f)
f.close() f.close()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment