summaryrefslogtreecommitdiff
path: root/cherrypy/lib/encoding.py
diff options
context:
space:
mode:
authorLakin Wecker <none@none>2009-06-01 19:07:39 +0000
committerLakin Wecker <none@none>2009-06-01 19:07:39 +0000
commit6a2c82c52b79596ddd6c9b4df646d133d51ff4c6 (patch)
treedaee3f0163a3c526007c07eb08fa046c0516b116 /cherrypy/lib/encoding.py
parent7281d1e7a6e8cd8a3f3e9f9c4d9174b510e3eb5e (diff)
downloadcherrypy-git-6a2c82c52b79596ddd6c9b4df646d133d51ff4c6.tar.gz
trunk - more changes to bring the two branches into a more similar state - this time normalizing StringIO imports.
Diffstat (limited to 'cherrypy/lib/encoding.py')
-rw-r--r--cherrypy/lib/encoding.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/cherrypy/lib/encoding.py b/cherrypy/lib/encoding.py
index 9ab1d2f0..dfddff7a 100644
--- a/cherrypy/lib/encoding.py
+++ b/cherrypy/lib/encoding.py
@@ -193,9 +193,10 @@ def compress(body, compress_level):
def decompress(body):
- import gzip, StringIO
+ import gzip
+ from cherrypy.py3util import StringIO
- zbuf = StringIO.StringIO()
+ zbuf = StringIO()
zbuf.write(body)
zbuf.seek(0)
zfile = gzip.GzipFile(mode='rb', fileobj=zbuf)