Commit 4c2b18da authored by Stefan Behnel's avatar Stefan Behnel

fix output writing in Py2 where io.StringIO does not support writing 'str'

parent 38abf1b6
......@@ -11,7 +11,10 @@ from datetime import datetime
from functools import partial
from collections import defaultdict
from xml.sax.saxutils import escape as html_escape
from io import StringIO
try:
from StringIO import StringIO
except ImportError:
from io import StringIO # does not support writing 'str' in Py2
from . import Version
from .Code import CCodeWriter
......
from io import StringIO
try:
from StringIO import StringIO
except ImportError:
from io import StringIO # does not support writing 'str' in Py2
class StringIOTree(object):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment