]> granicus.if.org Git - python/commitdiff
Bug #1603321: make pstats.Stats accept Unicode file paths.
authorGeorg Brandl <georg@python.org>
Sun, 26 Nov 2006 19:27:47 +0000 (19:27 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 26 Nov 2006 19:27:47 +0000 (19:27 +0000)
Lib/pstats.py

index 4e94b0ce0ee344654828757cfe90f73ba39ccb16..bdbb27e048d2e2a9f9f6b55075a5b61ef91800f9 100644 (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()