Skip to content

Commit

Permalink
Fix ReST errors in CHANGES.rst and flake8 errors in expressions and t…
Browse files Browse the repository at this point in the history
…est_expressions.py
  • Loading branch information
jamadden committed Mar 27, 2020
1 parent ea19372 commit bfdb1f0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Expand Up @@ -6,7 +6,9 @@
==================

- Cleanups for Plone 5.2:

* in path alternatives, whitespace can now surround ``|``,

* non-ASCII in ``SubPathExpr`` now raises a ``CompilerError``
(instead of a ``UnicodeEncodeError``; to be compatible with
the ``chameleon`` template engine).
Expand Down
2 changes: 1 addition & 1 deletion src/zope/tales/expressions.py
Expand Up @@ -68,7 +68,7 @@ def __init__(self, path, traverser, engine):
compiledpath = []
currentpath = []
try:
path = str(path)
path = str(path)
except Exception as e:
raise engine.getCompilerError()(
'could not convert %r to `str`: %s: %s'
Expand Down
2 changes: 1 addition & 1 deletion src/zope/tales/tests/test_expressions.py
Expand Up @@ -173,7 +173,7 @@ def testOrPathWithSpaces(self):
def testNonAsciiPath(self):
error = self.engine.getCompilerError()
with self.assertRaises(error):
expr = self.engine.compile(u'path: ä')
self.engine.compile(u'path: ä')

def test_path_CONTEXTS(self):
self.context.contexts = 42
Expand Down

0 comments on commit bfdb1f0

Please sign in to comment.