[Grok-dev] Registering a factory as a grok.GlobalUtility fails
Jan-Wijbrand Kolman
janwijbrand at gmail.com
Wed May 9 08:03:02 EDT 2007
Hi,
I want to register a (content)factory using grok.GlobalUtility.
However this fails during grok time with an maximum recursion depth
exceeded error. I can reproduce it with the following functional test
(in a module called 'factoryutility'py' in 'grok/ftests/utility'):
"""
>>> import grok
>>> from zope import component
>>> from grok.ftests.utility.local import *
>>> grok.grok('grok.ftests.utility.factoryutility')
"""
import grok
class ObjectFactory(grok.GlobalUtility):
grok.implements('IFactory')
grok.name('objectfactory')
def __call__(self):
return object()
Do I do something wrong here? I have, again, no clue...
kind regards,
jw
--
Jan-Wijbrand Kolman
More information about the Grok-dev
mailing list