summaryrefslogtreecommitdiff
path: root/paste/deploy/config.py
diff options
context:
space:
mode:
authorianb <devnull@localhost>2005-10-05 00:59:14 +0000
committerianb <devnull@localhost>2005-10-05 00:59:14 +0000
commit5017e9b8876e533c0547cf0929443d715b70b338 (patch)
tree79b5fe38d48e4ef4c921b439805eeb92d45e6896 /paste/deploy/config.py
parent65b5b5de85b2afb7d792608fa2be915d16f4170c (diff)
downloadpastedeploy-5017e9b8876e533c0547cf0929443d715b70b338.tar.gz
Dispatch __setitem__ and __contains__ specially
Diffstat (limited to 'paste/deploy/config.py')
-rw-r--r--paste/deploy/config.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/paste/deploy/config.py b/paste/deploy/config.py
index 055a1c2..912eeb0 100644
--- a/paste/deploy/config.py
+++ b/paste/deploy/config.py
@@ -117,6 +117,15 @@ class DispatchingConfig(object):
"or thread")
return conf[key]
+ def __contains__(self, key):
+ # I thought __getattr__ would catch this, but apparently not
+ return self.has_key(key)
+
+ def __setitem__(self, key, value):
+ # I thought __getattr__ would catch this, but apparently not
+ conf = self.current_conf()
+ conf[key] = value
+
CONFIG = DispatchingConfig()
class ConfigMiddleware(object):