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.
pull/295/head
David Wilson 6 years ago
parent 29f15c236c
commit b92545e61a

@ -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

Loading…
Cancel
Save