﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
3192	[patch] Noisier bugs in context processors	Jeremy Dunck <jdunck@…>	nobody	"I just spent an embarrassingly long time figuring out the cause of ""'NoneType' object has no attribute 'has_key'"" when rendering a template.

I had a buggy context processor which returned None under some conditions, which then made it onto the context stack.

It seems to me that Context.update could verify that it's getting an object that supports __getitem__ since it counts on that (and give a helpful error if it's not the case), but I understand context needs to be high-performance, and generally update is called for context processors anyway.

Perhaps RequestContext.__init__ could raise a TypeError.

Patch attached.  Feel free to ignore if I'm the only one to be bitten by this.  :-/

"	enhancement	closed	Template system	dev	normal	fixed			Accepted	1	0	0	1	0	0
