[Zope3-checkins]
SVN: Zope3/branches/roger-contentprovider/src/zope/contentprovider/tales.py
Bugfix expression handling
Roger Ineichen
roger at projekt01.ch
Fri Oct 7 10:48:32 EDT 2005
Log message for revision 38892:
Bugfix expression handling
Changed:
U Zope3/branches/roger-contentprovider/src/zope/contentprovider/tales.py
-=-
Modified: Zope3/branches/roger-contentprovider/src/zope/contentprovider/tales.py
===================================================================
--- Zope3/branches/roger-contentprovider/src/zope/contentprovider/tales.py 2005-10-07 14:29:42 UTC (rev 38891)
+++ Zope3/branches/roger-contentprovider/src/zope/contentprovider/tales.py 2005-10-07 14:48:31 UTC (rev 38892)
@@ -88,19 +88,20 @@
zope.interface.implements(interfaces.ITALESProviderExpression)
- def __init__(self, name, expr, engine):
+ def __call__(self, econtext):
+ expr = super(TALESProviderExpression, self).__call__(econtext)
if not '/' in expr:
raise KeyError('Use `iface/key` for defining the provider.')
parts = expr.split('/')
if len(parts) > 2:
- raise KeyError("Do not use more then one / for defining iface/key.")
+ msg = "Do not use more then one '/' for defining iface/key."
+ raise KeyError(msg)
# get interface from key
self._iface = parts[0]
self._name = parts[1]
- def __call__(self, econtext):
context = econtext.vars['context']
request = econtext.vars['request']
view = econtext.vars['view']
More information about the Zope3-Checkins
mailing list