Hi,

Ref: 
http://grok.zope.org/documentation/tutorial/grok-poller-tutorial/implementing-the-name-chooser

In the chooseName function,

name = name.replace(u' ', u'_').lower()

must come before

name = super(PollerNameChooser, self).chooseName(name, obj)


If not done so, adding "foo bar" the first time will use the name "foo_bar".
The second time, the chooseName picks "foo bar", replaces space with
underscore and sets name as foo_bar, and adding fails with a KeyError
as the name is already taken.


-- 
Vinay S Shastry
http://thenub.one09.net
_______________________________________________
grok-doc mailing list
[email protected]
https://mail.zope.org/mailman/listinfo/grok-doc

Reply via email to