minify: avoid cStringIO use.

On 2.7 it was "accidentally fine" because the buffer object the StringIO
was initialized from happened to look like ASCII, but in 2.6 either
UCS-2 or UCS-4 is used for that buffer, and so the result was junk.

Just use the io module everywhere if we can, falling back to pure-Python
StringIO for Python<2.6.
This commit is contained in:
David Wilson 2018-07-05 19:02:59 +01:00
parent 29f15c236c
commit b92545e61a
1 changed files with 2 additions and 2 deletions

View File

@ -29,9 +29,9 @@
import sys
try:
from cStringIO import StringIO
except ImportError:
from io import StringIO
except ImportError:
from StringIO import StringIO
import mitogen.core