_namemapper.c:PyNamemapper_valueForName calls PyObject_GetAttrString and doesn't check its return value for NULL. It does check PyErr_Occurred(), but that isn't being triggered in this case (which looks like a bug in the python c api -- I was getting this sporadically on a live service running python 2.4.6).
It should be checking for NULL as well and setting a python error and returning NULL in that case.
We worked around this by overriding __getattr__ instead of __getattribute__ (which should have been done in the first place), but the python issue, not protected against by cheetah, is still there.
Mind checking out SHA: e835293 to see if that's sufficient?
the only place I've seen it happen was at work, and we got rid of our __getattribute__ usage there (and I'm not sure how folks would feel about reintroducing it to test cheetah), but on my own time I'll try and write up a repro script.
Check our call to PyObject_GetAttrString() to make sure it returns a …
Should resolve issue: #6