Skip to content

Commit

Permalink
handle PY2 as well (even though no problems have been observed yet)
Browse files Browse the repository at this point in the history
  • Loading branch information
d-maurer committed Jul 23, 2020
1 parent 5efb94a commit f7118c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Products/PageTemplates/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ def __init__(self, type, expression, zt_engine):
# the ``_compile_zt_expr`` below causes this to be cached
# which can lead under Python 3 to unsolicited translations
# (details "https://github.com/zopefoundation/Zope/issues/876")
# call ``_compile_zt_expr`` with a "plain" string under PY3
expr = str(expression) if six.PY3 else expression
# call ``_compile_zt_expr`` with a "plain" string
expr = str(expression) if six.PY3 else unicode(expression)
self.expression = expression
# compile to be able to report errors
compiler_error = zt_engine.getCompilerError()
Expand Down

0 comments on commit f7118c2

Please sign in to comment.