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/24 18:57:17 UTC

[4/17] 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/c5d67711
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/c5d67711
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/c5d67711

Branch: refs/heads/cj/5145
Commit: c5d67711c7e0ef9639e214c9834a18081c9d6ee0
Parents: 5dc5275
Author: Cory Johns <jo...@geek.net>
Authored: Thu Oct 18 20:36:53 2012 +0000
Committer: Cory Johns <jo...@geek.net>
Committed: Wed Oct 24 16:56:41 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/c5d67711/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)