X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/b2d342589a7889a3b096e7192453d53bd28eed7d..d10c63f27d1494a04d57a6c805d093089526430a:/src/wolnelektury/middleware.py diff --git a/src/wolnelektury/middleware.py b/src/wolnelektury/middleware.py index 652c80c7b..956f97963 100644 --- a/src/wolnelektury/middleware.py +++ b/src/wolnelektury/middleware.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Original version taken from http://www.djangosnippets.org/snippets/186/ # Original author: udfalkso # Modified by: Shwagroo Team @@ -9,7 +8,7 @@ import re import hotshot import hotshot.stats import tempfile -import StringIO +import io import pprint from django.conf import settings @@ -101,7 +100,7 @@ class ProfileMiddleware(object): if (settings.DEBUG or request.user.is_superuser) and 'prof' in request.GET: self.prof.close() - out = StringIO.StringIO() + out = io.BytesIO() old_stdout = sys.stdout sys.stdout = out