[Python-checkins] r52845 - python/trunk/Lib/pstats.py

georg.brandl python-checkins at python.org
Sun Nov 26 20:27:48 CET 2006


Author: georg.brandl
Date: Sun Nov 26 20:27:47 2006
New Revision: 52845

Modified:
   python/trunk/Lib/pstats.py
Log:
Bug #1603321: make pstats.Stats accept Unicode file paths.


Modified: python/trunk/Lib/pstats.py
==============================================================================
--- python/trunk/Lib/pstats.py	(original)
+++ python/trunk/Lib/pstats.py	Sun Nov 26 20:27:47 2006
@@ -116,7 +116,7 @@
 
     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()


More information about the Python-checkins mailing list