summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorianb <ianb@localhost>2005-10-05 00:59:14 +0000
committerianb <ianb@localhost>2005-10-05 00:59:14 +0000
commit9a37ca6cc4bae8ae1c57623e879df750a2bc1a1b (patch)
tree79b5fe38d48e4ef4c921b439805eeb92d45e6896
parentd1c3c487e3ca364b4c9ad2e5c7c2243de5851d0c (diff)
downloadpastedeploy-git-9a37ca6cc4bae8ae1c57623e879df750a2bc1a1b.tar.gz
Dispatch __setitem__ and __contains__ specially
-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):