Commits

Eneldo Serrata committed 2a58172

StringIO is enough without the if sys.version...

  • Participants
  • Parent commits cf8617b
  • Branches eneldoserrata/stringio-is-enough-without-the-if-sysver-1371252709662

Comments (0)

Files changed (1)

cherrypy/lib/profiler.py

 import sys
 import warnings
 
-from cherrypy._cpcompat import BytesIO, StringIO
+from cherrypy._cpcompat import StringIO
 
 _count = 0
 
     def stats(self, filename, sortby='cumulative'):
         """:rtype stats(index): output of print_stats() for the given profile.
         """
-        if sys.version_info >= (3, 0):
-            sio = StringIO()
-        else:
-            sio = BytesIO()
+        sio = StringIO()
         if sys.version_info >= (2, 5):
             s = pstats.Stats(os.path.join(self.path, filename), stream=sio)
             s.strip_dirs()