Commit 21d900f1 authored by Georg Brandl's avatar Georg Brandl

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

parent 4d542ec1
......@@ -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()
......
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