diff options
author | ianb <devnull@localhost> | 2005-10-05 00:59:14 +0000 |
---|---|---|
committer | ianb <devnull@localhost> | 2005-10-05 00:59:14 +0000 |
commit | 5017e9b8876e533c0547cf0929443d715b70b338 (patch) | |
tree | 79b5fe38d48e4ef4c921b439805eeb92d45e6896 /paste | |
parent | 65b5b5de85b2afb7d792608fa2be915d16f4170c (diff) | |
download | pastedeploy-5017e9b8876e533c0547cf0929443d715b70b338.tar.gz |
Dispatch __setitem__ and __contains__ specially
Diffstat (limited to 'paste')
-rw-r--r-- | paste/deploy/config.py | 9 |
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): |