--- a/src/pyams_utils/tales.py Thu Jan 17 14:23:59 2019 +0100
+++ b/src/pyams_utils/tales.py Fri Jan 18 10:24:20 2019 +0100
@@ -16,15 +16,15 @@
# import standard library
import re
-# import interfaces
-from pyams_utils.interfaces.tales import ITALESExtension
-
# import packages
from chameleon.astutil import Symbol
from chameleon.codegen import template
from chameleon.tales import StringExpr
from zope.contentprovider.tales import addTALNamespaceData
+# import interfaces
+from pyams_utils.interfaces.tales import ITALESExtension
+
class ContextExprMixin(object):
"""Mixin-class for expression compilers"""
@@ -97,9 +97,9 @@
if extension is None:
extension = registry.queryAdapter(context, ITALESExtension, name=name)
- # provide a useful error message, if the extension was not found.
+ # return an empty string if the extension was not found.
if extension is None:
- return None
+ return ''
# Insert the data gotten from the context
addTALNamespaceData(extension, econtext)