From 73c1e8413faa3a72fc2e05b66423fd19fbd711e8 Mon Sep 17 00:00:00 2001 From: Omar Bohsali Date: Tue, 20 Oct 2015 10:27:14 -0700 Subject: [PATCH] python3 fix --- django_cprofile_middleware/middleware.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/django_cprofile_middleware/middleware.py b/django_cprofile_middleware/middleware.py index f7420c3..96ada0f 100644 --- a/django_cprofile_middleware/middleware.py +++ b/django_cprofile_middleware/middleware.py @@ -2,8 +2,13 @@ import cProfile as profile except ImportError: import profile + +try: + from cStringIO import StringIO +except: + from io import StringIO + import pstats -from io import StringIO from django.conf import settings