Skip to content

Commit

Permalink
Re #25: Use compatibility layer to get the right StringIO.
Browse files Browse the repository at this point in the history
Depending on the python version, the traceback handler in the standard library needs a different `StringIO`. `io.StringIO` does not work with Python 2.
  • Loading branch information
sallner committed Oct 3, 2018
1 parent 4401583 commit 5422662
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.rst
Expand Up @@ -4,6 +4,7 @@ Changelog
3.0b5 (unreleased)
------------------

- Fix regression with exception handling in ``<dtml-except>`` with Python 2.
- Stabilized TreeTag rendering for objects without ``_p_oid`` values.

- Added support for Python 3.7.
Expand Down
2 changes: 1 addition & 1 deletion src/DocumentTemplate/DT_Try.py
Expand Up @@ -14,7 +14,7 @@
import sys
import traceback

from io import StringIO
from six import StringIO
from DocumentTemplate.DT_Util import ParseError, parse_params, render_blocks
from DocumentTemplate.DT_Util import namespace, InstanceDict
from DocumentTemplate.DT_Return import DTReturn
Expand Down

0 comments on commit 5422662

Please sign in to comment.