You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2012/10/29 21:10:46 UTC
[15/25] git commit: [#5145] Support has_key / in for
CaseInsensitiveDict
[#5145] Support has_key / in for CaseInsensitiveDict
Signed-off-by: Cory Johns <jo...@geek.net>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/ac80a0d1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/ac80a0d1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/ac80a0d1
Branch: refs/heads/cj/5076
Commit: ac80a0d1013e32b8aea9def83949e0f3a5fc9543
Parents: 1e1960c
Author: Cory Johns <jo...@geek.net>
Authored: Thu Oct 18 20:36:53 2012 +0000
Committer: Cory Johns <jo...@geek.net>
Committed: Fri Oct 26 20:32:08 2012 +0000
----------------------------------------------------------------------
Allura/allura/lib/utils.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ac80a0d1/Allura/allura/lib/utils.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/utils.py b/Allura/allura/lib/utils.py
index 2fb0390..c1b9f8c 100644
--- a/Allura/allura/lib/utils.py
+++ b/Allura/allura/lib/utils.py
@@ -373,6 +373,9 @@ class CaseInsensitiveDict(dict):
def __delitem__(self, name):
super(CaseInsensitiveDict, self).__delitem__(name.lower())
+ def __contains__(self, name):
+ return super(CaseInsensitiveDict, self).__contains__(name.lower())
+
def pop(self, k, *args):
return super(CaseInsensitiveDict, self).pop(k.lower(), *args)