incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [4/17] git commit: [#5145] Support has_key / in for CaseInsensitiveDict
Date Wed, 24 Oct 2012 16:57:17 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/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 <johnsca@geek.net>
Authored: Thu Oct 18 20:36:53 2012 +0000
Committer: Cory Johns <johnsca@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)
 


Mime
View raw message