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 2, 2018
1 parent 73677ed commit ca0ab5c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
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.


Expand Down
2 changes: 1 addition & 1 deletion src/DocumentTemplate/DT_Try.py
Original file line number Diff line number Diff line change
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 ca0ab5c

Please sign in to comment.