[Grok-dev] Bug in megrok.z3cform

Jeroen Michiel jmichiel at yahoo.com
Thu Feb 11 16:36:25 EST 2010


Hi, 

I just found a nasty windows-specific bug in megrok.z3cform.base.
In the WidgetTemplateGrokker
this code (line 69):
        template_path = '/'.join(factory.module_info.path.split('/')[:-1])
always evaluates to '/' on windows, causing the template to be searched on
the root path.

This:
        template_path = os.path.split(factory.module_info.path)[0]
does the trick os-independently, however.

This one bit me yesterday evening, and I didn't have a clue what was going
on, or why grok was looking for the template in the root dir. I thought it
was some weird misconfiguration someplace, but finally I saw the light ;-)

Perhaps there are other bugs like that lurking around...
-- 
View this message in context: http://old.nabble.com/Bug-in-megrok.z3cform-tp27555145p27555145.html
Sent from the Grok mailing list archive at Nabble.com.



More information about the Grok-dev mailing list