[Python-checkins] r52846 - python/branches/release25-maint/Lib/pstats.py

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


Author: georg.brandl
Date: Sun Nov 26 20:27:51 2006
New Revision: 52846

Modified:
   python/branches/release25-maint/Lib/pstats.py
Log:
Bug #1603321: make pstats.Stats accept Unicode file paths.
 (backport from rev. 52845)

Modified: python/branches/release25-maint/Lib/pstats.py
==============================================================================
--- python/branches/release25-maint/Lib/pstats.py	(original)
+++ python/branches/release25-maint/Lib/pstats.py	Sun Nov 26 20:27:51 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