Bug #1603321: make pstats.Stats accept Unicode file paths.
 (backport from rev. 52845)
diff --git a/Lib/pstats.py b/Lib/pstats.py
index 4e94b0c..bdbb27e 100644
--- a/Lib/pstats.py
+++ b/Lib/pstats.py
@@ -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()