From 8aedc6dbfcfbe4f1d7ea390eafc2b2046ff7bf27 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 2 Nov 2010 02:35:16 -0400 Subject: right exception type --- pyramid/interfaces.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyramid/interfaces.py b/pyramid/interfaces.py index 461a0d82c..294613c13 100644 --- a/pyramid/interfaces.py +++ b/pyramid/interfaces.py @@ -81,12 +81,12 @@ class IBeforeRender(Interface): def __setitem__(name, value): """ Set a name/value pair into the dictionary which is passed to a renderer as the renderer globals dictionary. If the ``name`` already - exists in the target dictionary, a :exc:`NameError` will be raised.""" + exists in the target dictionary, a :exc:`KeyError` will be raised.""" def update(d): """ Update the renderer globals dictionary with another dictionary ``d``. If any of the key names in the source dictionary already exist - in the target dictionary, a :exc:`NameError` will be raised""" + in the target dictionary, a :exc:`KeyError` will be raised""" def __contains__(k): """ Return ``True`` if ``k`` exists in the renderer globals -- cgit v1.2.3