summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cherrypy/lib/profiler.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/cherrypy/lib/profiler.py b/cherrypy/lib/profiler.py
index f7bf2eb3..39129bbe 100644
--- a/cherrypy/lib/profiler.py
+++ b/cherrypy/lib/profiler.py
@@ -53,7 +53,7 @@ import os, os.path
import sys
import warnings
-from cherrypy._cpcompat import BytesIO, StringIO
+from cherrypy._cpcompat import StringIO
_count = 0
@@ -85,10 +85,7 @@ class Profiler(object):
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()