incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [15/25] git commit: [#5145] Support has_key / in for CaseInsensitiveDict
Date Mon, 29 Oct 2012 20:10:46 GMT
[#5145] Support has_key / in for CaseInsensitiveDict

Signed-off-by: Cory Johns <johnsca@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 <johnsca@geek.net>
Authored: Thu Oct 18 20:36:53 2012 +0000
Committer: Cory Johns <johnsca@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)
 


Mime
View raw message